mirror of
https://github.com/diced/zipline.git
synced 2025-12-05 20:40:12 -08:00
feat: add service_healthy + healthcheck to docker-compose (#811)
* Update docker-compose.yml Since you use healthcheck anyway, you get to verify that postgres is healthy * Update README.md Update the README with 'depends_on: postgresql: condition: service_healthy' * Add zipline healthcheck to docker-compose.yml * Add docker-compose healthcheck for zipline to README.md * Update docker-compose.yml --------- Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
@@ -77,11 +77,17 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline}
|
- DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgresql
|
postgresql:
|
||||||
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- './uploads:/zipline/uploads'
|
- './uploads:/zipline/uploads'
|
||||||
- './public:/zipline/public'
|
- './public:/zipline/public'
|
||||||
- './themes:/zipline/themes'
|
- './themes:/zipline/themes'
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD', 'wget', '-q', '--spider', 'http://localhost:3000/api/healthcheck']
|
||||||
|
interval: 15s
|
||||||
|
timeout: 2s
|
||||||
|
retries: 2
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|||||||
@@ -26,11 +26,17 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline}
|
- DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgresql
|
postgresql:
|
||||||
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- './uploads:/zipline/uploads'
|
- './uploads:/zipline/uploads'
|
||||||
- './public:/zipline/public'
|
- './public:/zipline/public'
|
||||||
- './themes:/zipline/themes'
|
- './themes:/zipline/themes'
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD', 'wget', '-q', '--spider', 'http://0.0.0.0:3000/api/healthcheck']
|
||||||
|
interval: 15s
|
||||||
|
timeout: 2s
|
||||||
|
retries: 2
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|||||||
Reference in New Issue
Block a user