diff --git a/README.md b/README.md index a7b6d1cc..d049bb38 100755 --- a/README.md +++ b/README.md @@ -77,11 +77,17 @@ services: environment: - DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline} depends_on: - - postgresql + postgresql: + condition: service_healthy volumes: - './uploads:/zipline/uploads' - './public:/zipline/public' - './themes:/zipline/themes' + healthcheck: + test: ['CMD', 'wget', '-q', '--spider', 'http://localhost:3000/api/healthcheck'] + interval: 15s + timeout: 2s + retries: 2 volumes: pgdata: diff --git a/docker-compose.yml b/docker-compose.yml index 9bfa1233..680c8c05 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,11 +26,17 @@ services: environment: - DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline} depends_on: - - postgresql + postgresql: + condition: service_healthy volumes: - './uploads:/zipline/uploads' - './public:/zipline/public' - './themes:/zipline/themes' + healthcheck: + test: ['CMD', 'wget', '-q', '--spider', 'http://0.0.0.0:3000/api/healthcheck'] + interval: 15s + timeout: 2s + retries: 2 volumes: pgdata: