Skip to content

Commit

Permalink
chore(documentation): Update Docker Compose examples to use pgvector:…
Browse files Browse the repository at this point in the history
…pg16 (#29818) (#29915)

### Proposed Changes
* This pull request updates the Docker image version used for the
database to pgvector/pgvector:pg16. The following Docker Compose
manifests have been adjusted accordingly, with some improvements:

- single-node
- single-node-debug-mode
- single-node-demo-site
- with-opensearch-dashboard
- push-publish

*Pending Updates*
The following examples have not been updated in this pull request, as
they are currently not functioning correctly. A separate task has been
created to address these issues during the next gardening day. Please
refer to Issue #29909 for more details:

- cluster-mode
- with-redis
- with-redis-session

### Additional Info
Related to #29818 (Update Docker Compose examples to use pgvector:pg16).
  • Loading branch information
dcolina authored Sep 9, 2024
1 parent 7e68e87 commit 6f66f1b
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 182 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ services:
- "8443:8443"

db-sender:
image: postgres:15
image: pgvector/pgvector:pg16
command: postgres -c 'max_connections=400' -c 'shared_buffers=128MB'
environment:
"POSTGRES_USER": 'dotcmsdbuser'
Expand Down Expand Up @@ -133,7 +133,7 @@ services:
- "8444:8443"

db-receiver:
image: postgres:15
image: pgvector/pgvector:pg16
command: postgres -c 'max_connections=400' -c 'shared_buffers=128MB'
environment:
"POSTGRES_USER": 'dotcmsdbuser'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A single instance of dotcms running on port 8080. Database: postgres. Debug mode
3) A custom starter can be set through this line (uncomment and change the starter url accordingly):

```
#"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240719/starter-20240719.zip'
```

#### Run an example:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,66 @@
version: '3.5'

networks:
db_net:
opensearch-net:

volumes:
cms-shared:
dbdata:
opensearch-data:

services:
db:
image: pgvector/pgvector:pg16
command: postgres -c 'max_connections=400' -c 'shared_buffers=128MB'
environment:
POSTGRES_USER: 'dotcmsdbuser'
POSTGRES_PASSWORD: 'password'
POSTGRES_DB: 'dotcms'
volumes:
- dbdata:/var/lib/postgresql/data
networks:
- db_net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dotcmsdbuser -d dotcms -h localhost -p 5432"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped

opensearch:
image: opensearchproject/opensearch:1
environment:
- cluster.name=elastic-cluster
- discovery.type=single-node
- data
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xmx1G "
cluster.name: "elastic-cluster"
discovery.type: "single-node"
bootstrap.memory_lock: "true"
OPENSEARCH_JAVA_OPTS: "-Xmx1G"
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)
soft: -1
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
soft: 65536
hard: 65536
ports:
- 9200:9200
- 9600:9600
- "9200:9200"
- "9600:9600"
volumes:
- opensearch-data:/usr/share/opensearch/data
- opensearch-data:/usr/share/opensearch/data
networks:
- opensearch-net
deploy:
resources:
limits:
cpus: "1.0"
memory: 2G

dotcms:
image: dotcms/dotcms:latest
environment:
CMS_JAVA_OPTS: '-Xmx1g -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000 '
LANG: 'C.UTF-8'
TZ: 'UTC'
DB_BASE_URL: "jdbc:postgresql://db/dotcms"
DB_USERNAME: 'dotcmsdbuser'
DB_PASSWORD: 'password'
DOT_ES_AUTH_BASIC_PASSWORD: 'admin'
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240719/starter-20240719.zip'
CMS_JAVA_OPTS: '-Xmx1g -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000 '
LANG: 'C.UTF-8'
TZ: 'UTC'
DB_BASE_URL: "jdbc:postgresql://db/dotcms"
DB_USERNAME: 'dotcmsdbuser'
DB_PASSWORD: 'password'
DOT_ES_AUTH_BASIC_PASSWORD: 'admin'
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240719/starter-20240719.zip'
depends_on:
- opensearch
- db
- opensearch
volumes:
- cms-shared:/data/shared
#- {license_local_path}/license.zip:/data/shared/assets/license.zip
Expand All @@ -58,17 +69,13 @@ services:
- opensearch-net
ports:
- "8082:8082"
- "8000:8000"
- "8443:8443"

db:
image: postgres:15
command: postgres -c 'max_connections=400' -c 'shared_buffers=128MB'
environment:
"POSTGRES_USER": 'dotcmsdbuser'
"POSTGRES_PASSWORD": 'password'
"POSTGRES_DB": 'dotcms'
volumes:
- dbdata:/var/lib/postgresql/data
networks:
- db_net
networks:
db_net:
opensearch-net:

volumes:
cms-shared:
dbdata:
opensearch-data:
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A single instance of dotcms running on port 8080 that will download and install
#### Environment setup
Specifiy a custom starter that will be included:
```
"CUSTOM_STARTER_URL": "https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/xxxxxxxxxx.zip"
CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/xxxxxxxxxx.zip'
```
A local path to license pack can be set here:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,66 @@
version: '3.5'

networks:
db_net:
opensearch-net:

volumes:
cms-shared:
dbdata:
opensearch-data:

services:
db:
image: pgvector/pgvector:pg16
command: postgres -c 'max_connections=400' -c 'shared_buffers=128MB'
environment:
POSTGRES_USER: 'dotcmsdbuser'
POSTGRES_PASSWORD: 'password'
POSTGRES_DB: 'dotcms'
volumes:
- dbdata:/var/lib/postgresql/data
networks:
- db_net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dotcmsdbuser -d dotcms -h localhost -p 5432"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped

opensearch:
image: opensearchproject/opensearch:1
environment:
- cluster.name=elastic-cluster
- discovery.type=single-node
- data
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xmx1G "
cluster.name: "elastic-cluster"
discovery.type: "single-node"
bootstrap.memory_lock: "true"
OPENSEARCH_JAVA_OPTS: "-Xmx1G"
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)
soft: -1
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
soft: 65536
hard: 65536
ports:
- 9200:9200
- 9600:9600
- "9200:9200"
- "9600:9600"
volumes:
- opensearch-data:/usr/share/opensearch/data
networks:
- opensearch-net
deploy:
resources:
limits:
cpus: "1.0"
memory: 2G

dotcms:
image: dotcms/dotcms:latest
environment:
CMS_JAVA_OPTS: '-Xmx1g '
LANG: 'C.UTF-8'
TZ: 'UTC'
DB_BASE_URL: "jdbc:postgresql://db/dotcms"
DB_USERNAME: 'dotcmsdbuser'
DB_PASSWORD: 'password'
DOT_ES_AUTH_BASIC_PASSWORD: 'admin'
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
CUSTOM_STARTER_URL: https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240719/starter-20240719.zip
CMS_JAVA_OPTS: '-Xmx1g '
LANG: 'C.UTF-8'
TZ: 'UTC'
DB_BASE_URL: "jdbc:postgresql://db/dotcms"
DB_USERNAME: 'dotcmsdbuser'
DB_PASSWORD: 'password'
DOT_ES_AUTH_BASIC_PASSWORD: 'admin'
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240719/starter-20240719.zip'
depends_on:
- opensearch
- db
- opensearch
volumes:
- cms-shared:/data/shared
#- {license_local_path}/license.zip:/data/shared/assets/license.zip
Expand All @@ -60,14 +71,11 @@ services:
- "8082:8082"
- "8443:8443"

db:
image: postgres:15
command: postgres -c 'max_connections=400' -c 'shared_buffers=128MB'
environment:
"POSTGRES_USER": 'dotcmsdbuser'
"POSTGRES_PASSWORD": 'password'
"POSTGRES_DB": 'dotcms'
volumes:
- dbdata:/var/lib/postgresql/data
networks:
- db_net
networks:
db_net:
opensearch-net:

volumes:
cms-shared:
dbdata:
opensearch-data:
2 changes: 1 addition & 1 deletion docker/docker-compose-examples/single-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A single instance of dotcms running on port 8080. Database: postgres
3) A custom starter can be set through this line (uncomment and change the starter url accordingly):

```
#"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240719/starter-20240719.zip'
```

#### Run an example:
Expand Down
Loading

0 comments on commit 6f66f1b

Please sign in to comment.