34 lines
883 B
YAML
34 lines
883 B
YAML
|
services:
|
||
|
overleafmongo:
|
||
|
image: "mongo:6.0"
|
||
|
container_name: overleafmongo
|
||
|
hostname: overleafmongo
|
||
|
restart: always
|
||
|
healthcheck:
|
||
|
test: "mongosh --quiet --eval 'rs.hello().setName ? rs.hello().setName : rs.initiate({_id: \"overleaf\",members:[{_id: 0, host:\"overleafmongo:27017\"}]})'"
|
||
|
interval: 10s
|
||
|
timeout: 10s
|
||
|
retries: 5
|
||
|
command: "--replSet overleaf"
|
||
|
expose:
|
||
|
- 27017
|
||
|
volumes:
|
||
|
- /docker/compose/overleafmongo/data_db:/data/db
|
||
|
- /docker/compose/overleafmongo/data_configdb:/data/configdb
|
||
|
- /docker/compose/overleafmongo/backup:/backup
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
networks:
|
||
|
- overleaf-network
|
||
|
extra_hosts:
|
||
|
- "mongo:127.0.0.1"
|
||
|
- "overleafmongo:127.0.0.1"
|
||
|
|
||
|
volumes:
|
||
|
overleaf_mongo:
|
||
|
overleaf_mongo_cdb:
|
||
|
|
||
|
networks:
|
||
|
overleaf-network:
|
||
|
external: true
|
||
|
|