Files
kt-financial-system/docker-compose.yml
你的用户名 b68511b2e2
Some checks failed
Deploy to Production / Build and Test (push) Successful in 10m51s
Deploy to Production / Deploy to Server (push) Failing after 6m41s
feat: migrate backend storage to postgres
2025-11-06 22:01:50 +08:00

55 lines
1.2 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: kt-financial-postgres
restart: unless-stopped
environment:
- POSTGRES_DB=kt_financial
- POSTGRES_USER=kt_financial
- POSTGRES_PASSWORD=kt_financial_pwd
- TZ=Asia/Shanghai
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U kt_financial -d kt_financial']
interval: 10s
timeout: 5s
retries: 6
networks:
- kt-network
kt-financial:
build:
context: .
dockerfile: Dockerfile
container_name: kt-financial-system
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
ports:
- "8080:80"
environment:
- NODE_ENV=production
- TZ=Asia/Shanghai
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=kt_financial
- POSTGRES_USER=kt_financial
- POSTGRES_PASSWORD=kt_financial_pwd
volumes:
- ./logs:/var/log
- ./storage/backend:/app/apps/backend/storage
- ./data:/app/data:ro
networks:
- kt-network
networks:
kt-network:
driver: bridge
volumes:
postgres-data: