Skip to content

Commit

Permalink
remove deprecated chmod command for older mongodb in example docker-c…
Browse files Browse the repository at this point in the history
…ompose + adjust networks
  • Loading branch information
fmigneault committed Sep 5, 2023
1 parent fe2a478 commit 1f309ae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docker/docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ services:
# WARNING: see detail in 'worker' definition
- /tmp/weaver/wps-outputs:/tmp/weaver/wps-outputs
networks:
# network 'default' is created by default by docker-compose
# adjust to whichever service that offers HTTP access if using more advanced networking definitions
- default
- mongodb
restart: always
logging: *default-logging

Expand All @@ -49,6 +52,7 @@ services:
# This avoids Weaver-API to be able to run Docker commands directly.
# Furthermore, only the Worker has the 'docker-cli' preinstalled.
- docker-proxy
- mongodb
links:
- mongodb
volumes:
Expand Down Expand Up @@ -103,6 +107,7 @@ services:
# WARNING:
# Never expose this container's port to a public network.
# Other containers that require docker (weaver-worker) should communicate only through 'docker-proxy' network.
# Other networks such as database connection should also be avoided to get components separated.
networks:
- docker-proxy
logging: *default-logging
Expand All @@ -116,11 +121,12 @@ services:
container_name: mongodb
volumes:
- /data/mongodb_persist:/data/db
# MongoDB crash with permission denied errors if the command is not overridden like this
command: bash -c 'chown -R mongodb:mongodb /data && chmod -R 755 /data && mongod'
networks:
- mongodb
restart: always
logging: *default-logging

networks:
mongodb: {}
docker-proxy:
driver: bridge

0 comments on commit 1f309ae

Please sign in to comment.