2c5f83f64e
- docker-compose.yml 添加 env_file 加载 backend/.env - deploy.sh 自动检测并从 .env.example 复制模板 - .dockerignore 排除 .env 防止密钥泄露到镜像
28 lines
472 B
YAML
28 lines
472 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
env_file:
|
|
- ./backend/.env
|
|
environment:
|
|
- GEN2D_MODE=release
|
|
volumes:
|
|
- backend-data:/data
|
|
expose:
|
|
- "8080"
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "${GEN2D_PORT:-10000}:80"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
backend-data:
|