Update and rename compose.yaml to compose.yaml
This commit is contained in:
parent
cf9b645030
commit
0e11224e81
2 changed files with 31 additions and 17 deletions
|
@ -1,17 +0,0 @@
|
||||||
services:
|
|
||||||
mongo:
|
|
||||||
image: "mongo:5.0"
|
|
||||||
container_name: "mongo"
|
|
||||||
hostname: "mongo"
|
|
||||||
restart: always
|
|
||||||
volumes:
|
|
||||||
- mongo:/data/db
|
|
||||||
- mongo_cdb:/data/configdb
|
|
||||||
ports:
|
|
||||||
- 27017:27017
|
|
||||||
network_mode: bridge
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mongo:
|
|
||||||
mongo_cdb:
|
|
||||||
|
|
31
ubuntu/overleafmongo/compose.yaml
Normal file
31
ubuntu/overleafmongo/compose.yaml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# docker network create overleaf-network
|
||||||
|
services:
|
||||||
|
overleafmongo:
|
||||||
|
image: "mongo:5.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:
|
||||||
|
- overleaf_mongo:/data/db
|
||||||
|
- overleaf_mongo_cdb:/data/configdb
|
||||||
|
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
|
Loading…
Reference in a new issue