Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (58 loc) · 1.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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:
- "127.0.0.1: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)
# NOTE: must be writable for /api/settings/save to persist changes
- ./backend_api_python/.env:/app/.env
environment:
- PYTHON_API_HOST=0.0.0.0
- PYTHON_API_PORT=5000
- TZ=Asia/Shanghai
- SQLITE_DATABASE_FILE=/app/data/quantdinger.db
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:
- "8888: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: