@@ -0,0 +1,61 @@
|
||||
# QuantDinger Docker Compose
|
||||
# Quick start: docker-compose up -d
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Backend API Service
|
||||
backend:
|
||||
build:
|
||||
context: ./backend_api_python
|
||||
dockerfile: Dockerfile
|
||||
container_name: quantdinger-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
# Persistent database and logs
|
||||
- ./backend_api_python/quantdinger.db:/app/quantdinger.db
|
||||
- ./backend_api_python/logs:/app/logs
|
||||
- ./backend_api_python/data:/app/data
|
||||
# Configuration file (optional, for development)
|
||||
- ./backend_api_python/.env:/app/.env:ro
|
||||
environment:
|
||||
- PYTHON_API_HOST=0.0.0.0
|
||||
- PYTHON_API_PORT=5000
|
||||
- TZ=Asia/Shanghai
|
||||
networks:
|
||||
- quantdinger-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Frontend Web Service
|
||||
frontend:
|
||||
build:
|
||||
context: ./quantdinger_vue
|
||||
dockerfile: Dockerfile
|
||||
container_name: quantdinger-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- quantdinger-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
networks:
|
||||
quantdinger-network:
|
||||
driver: bridge
|
||||
|
||||
# Optional: Add data volumes (for more complex persistence)
|
||||
# volumes:
|
||||
# backend-data:
|
||||
# backend-logs:
|
||||
Reference in New Issue
Block a user