Added mongo healthcheck to docker-compose (#636)

This commit is contained in:
Miguel Serrano 2019-09-11 14:07:26 +02:00 committed by GitHub
parent f3e1f01a97
commit c23c2f3447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -1,4 +1,4 @@
version: '2'
version: '2.2'
services:
sharelatex:
ports:

View file

@ -1,12 +1,14 @@
version: '2'
version: '2.2'
services:
sharelatex:
restart: always
image: sharelatex/sharelatex
container_name: sharelatex
depends_on:
- mongo
- redis
mongo:
condition: service_healthy
redis:
condition: service_started
privileged: true
ports:
- 80:80
@ -93,6 +95,11 @@ services:
- 27017
volumes:
- ~/mongo_data:/data/db
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
redis:
restart: always