Dominion/docker-compose.yml
2026-08-07 21:19:17 +05:00

67 lines
1.8 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database Service
postgres:
image: postgres:16-alpine
container_name: balance-sheet-postgres
restart: unless-stopped
environment:
POSTGRES_DB: balance_sheet_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres_secure_pass_2026}
expose:
- "5432"
volumes:
- postgres_db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# Express + React Application Web Service
balance-sheet-portal:
build:
context: .
dockerfile: Dockerfile
image: balance-sheet-portal:latest
container_name: balance-sheet-portal
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
ports:
- "3000:3000"
expose:
- "3000"
labels:
- "coolify.managed=true"
- "coolify.port=3000"
environment:
- NODE_ENV=production
- PORT=3000
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-postgres_secure_pass_2026}@postgres:5432/balance_sheet_db
- DATA_PATH=/app/data/portal-data.json
- SMTP_HOST=${SMTP_HOST:-}
- SMTP_PORT=${SMTP_PORT:-}
- SMTP_USER=${SMTP_USER:-}
- SMTP_PASS=${SMTP_PASS:-}
- SMTP_FROM=${SMTP_FROM:-}
- SMTP_USE_TLS=${SMTP_USE_TLS:-}
volumes:
- portal_data:/app/data
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://127.0.0.1:3000/api/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
volumes:
portal_data:
name: balance_sheet_portal_data
driver: local
postgres_db_data:
name: balance_sheet_postgres_data
driver: local