fix deployment by adding postgres service to base compose

This commit is contained in:
2026-02-24 14:02:49 -05:00
parent 52a4ab38d3
commit 468ea5f252
4 changed files with 31 additions and 25 deletions

View File

@@ -2,28 +2,6 @@ services:
app:
ports:
- '${APP_PORT:-3000}:3000'
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: ${DATABASE_URL:-postgres://postgres:postgres@postgres:5432/fiscal_clone}
BETTER_AUTH_BASE_URL: ${BETTER_AUTH_BASE_URL:-http://localhost:3000}
BETTER_AUTH_TRUSTED_ORIGINS: ${BETTER_AUTH_TRUSTED_ORIGINS:-http://localhost:3000}
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: fiscal_clone
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d fiscal_clone']
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data: