- 生成完整的 README.md 项目文档 - 统一图片路径为相对引用 - 完善 .gitignore 配置,添加常见忽略项 - 清理未使用的临时文件和图片资源 - 删除废弃的脚本文件
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: yunhaifinance-postgres
|
|
ports:
|
|
- "10052:5432"
|
|
volumes:
|
|
- yunhaifinance-postgres-data:/var/lib/postgresql/data
|
|
- ./scripts/init_sample_data.sql:/docker-entrypoint-initdb.d/999_init_sample_data.sql:ro
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
|
|
POSTGRES_DB: ${DB_NAME:-company_finance}
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=zh_CN.UTF-8"
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: yunhaifinance-backend
|
|
ports:
|
|
- "10051:3000"
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3000
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_NAME: ${DB_NAME:-company_finance}
|
|
DB_USER: ${DB_USER:-postgres}
|
|
DB_PASSWORD: ${DB_PASSWORD:-changeme}
|
|
JWT_SECRET: ${JWT_SECRET:-please-change-this-secret}
|
|
CORS_ORIGIN: ${CORS_ORIGIN:-}
|
|
depends_on:
|
|
- postgres
|
|
volumes:
|
|
- yunhaifinance-upload-data:/app/uploads
|
|
networks:
|
|
- yunhaifinance-network
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: yunhaifinance-frontend
|
|
ports:
|
|
- "10050:80"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- yunhaifinance-network
|
|
|
|
volumes:
|
|
yunhaifinance-postgres-data:
|
|
yunhaifinance-upload-data:
|
|
|
|
networks:
|
|
yunhaifinance-network: |