fix: nginx dns re-resolve, db healthcheck, explicit bind

This commit is contained in:
mahmood
2026-09-10 14:51:57 +03:30
parent 7d93507089
commit 1b675804ea
5 changed files with 25 additions and 5 deletions
+8 -1
View File
@@ -13,14 +13,21 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-goldbank}"]
interval: 5s
timeout: 5s
retries: 12
api:
build:
context: ./apps/api
dockerfile: Dockerfile
container_name: goldbank_api
# Prisma connects on module init, so a not-yet-ready DB crash-loops the API.
depends_on:
- db
db:
condition: service_healthy
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgres@db:5432/goldbank?schema=public}
- PORT=${PORT:-3000}