diff --git a/services/ark/docker-compose.yml b/services/ark/docker-compose.yml index b0eadc6..237fe7a 100644 --- a/services/ark/docker-compose.yml +++ b/services/ark/docker-compose.yml @@ -10,12 +10,16 @@ services: volumes: - postgres_data:/var/lib/postgresql/data command: postgres -c max_connections=1000 + healthcheck: + test: pg_isready -U postgres -d ark + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s app: build: . restart: unless-stopped - depends_on: - - db environment: DATABASE_URL: postgres://postgres:postgres@db:5432/ark ports: @@ -39,6 +43,9 @@ services: net.ipv4.tcp_keepalive_probes: 5 cpus: 2 mem_limit: 2048M + depends_on: + db: + condition: service_healthy volumes: postgres_data: