feat: migrate backend storage to postgres
This commit is contained in:
@@ -1,23 +1,54 @@
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user