feat: add health checks

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2025-12-21 01:54:37 +01:00
parent 220a140d11
commit d7ead631b0

View File

@@ -13,8 +13,16 @@ services:
networks: networks:
- public - public
- internal - internal
healthcheck:
test: ["CMD", "/app/forest-server", "--external-host", "http://127.0.0.1:4040", "admin", "status"]
interval: 10s
timeout: 10s
retries: 3
start_period: 30s
depends_on: depends_on:
- "postgres" postgres:
condition: service_healthy
restart: true
postgres: postgres:
image: postgres:18 image: postgres:18
@@ -23,13 +31,17 @@ services:
env_file: ".env" env_file: ".env"
networks: networks:
- internal - internal
# ports:
# - "5432:5432"
volumes: volumes:
- ./data/postgres/18:/var/lib/postgresql/18/docker - ./data/postgres/18:/var/lib/postgresql/18/docker
environment: environment:
POSTGRES_USER: forest POSTGRES_USER: forest
POSTGRES_DB: forest POSTGRES_DB: forest
healthcheck:
test: ["CMD", "pg_isready", "-U", "forest", "-d", "forest"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
networks: networks:
public: public: