完成基础开发
This commit is contained in:
52
docker-compose.yml
Normal file
52
docker-compose.yml
Normal file
@ -0,0 +1,52 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# 后端服务
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: qbit-manager-backend
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- FLASK_ENV=production
|
||||
- APP_HOST=0.0.0.0
|
||||
- APP_PORT=8888
|
||||
- DEBUG=False
|
||||
- CLIENTS_CONFIG_PATH=/app/data/clients.json
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
networks:
|
||||
- qbit-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8888/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# 前端服务
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: qbit-manager-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- qbit-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:80"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
networks:
|
||||
qbit-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
qbit-data:
|
||||
driver: local
|
Reference in New Issue
Block a user