mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-13 11:59:14 -05:00
Add mongoinit to fix initial docker-compose file
This commit is contained in:
parent
70c05dd5f7
commit
73a42b5fd1
1 changed files with 15 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
|||
version: '2.2'
|
||||
services:
|
||||
sharelatex:
|
||||
restart: always
|
||||
|
@ -108,6 +107,7 @@ services:
|
|||
restart: always
|
||||
image: mongo:5.0
|
||||
container_name: mongo
|
||||
command: "--replSet overleaf"
|
||||
expose:
|
||||
- 27017
|
||||
volumes:
|
||||
|
@ -118,6 +118,20 @@ services:
|
|||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
mongoinit:
|
||||
image: mongo:5.0
|
||||
# this container will exit after executing the command
|
||||
restart: no
|
||||
depends_on:
|
||||
mongo:
|
||||
condition: service_healthy
|
||||
command:
|
||||
- mongo
|
||||
- --host
|
||||
- mongo:27017
|
||||
- --eval
|
||||
- 'rs.initiate({ _id: "overleaf", members: [ { _id: 0, host: "mongo:27017" } ] })'
|
||||
|
||||
redis:
|
||||
restart: always
|
||||
image: redis:6.2
|
||||
|
|
Loading…
Reference in a new issue