2026-03-01 03:04:24 +08:00
|
|
|
services:
|
|
|
|
|
app:
|
|
|
|
|
build: .
|
|
|
|
|
ports:
|
2026-03-01 17:58:08 +08:00
|
|
|
- '${APP_PORT:-3001}:3000'
|
2026-03-01 03:04:24 +08:00
|
|
|
env_file: .env
|
|
|
|
|
environment:
|
|
|
|
|
- DATABASE_URL=postgresql://sub2apipay:${DB_PASSWORD:-password}@db:5432/sub2apipay
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: sub2apipay
|
|
|
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
|
|
|
|
POSTGRES_DB: sub2apipay
|
|
|
|
|
volumes:
|
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
|
healthcheck:
|
2026-03-01 17:58:08 +08:00
|
|
|
test: ['CMD-SHELL', 'pg_isready -U sub2apipay']
|
2026-03-01 03:04:24 +08:00
|
|
|
interval: 5s
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
pgdata:
|