-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
138 lines (128 loc) · 3.27 KB
/
Copy pathdocker-compose.yml
File metadata and controls
138 lines (128 loc) · 3.27 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: '3.8'
services:
# Database Service (MySQL)
db:
image: mysql:8.0
container_name: mimic_lab_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: bharatquant_sniper
ports:
- "3307:3306" # Expose on 3307 to avoid conflict with local MySQL
volumes:
- db_data:/var/lib/mysql
# Backend Service (FastAPI)
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: mimic_lab_backend
restart: always
ports:
- "8000:8000"
environment:
- DATABASE_URL=mysql+pymysql://root:root@db/bharatquant_sniper
- REDIS_HOST=redis
- ENABLE_AUTO_TRADING=false
env_file: .env
depends_on:
- db
volumes:
- ./src:/app/src
- ./data:/app/data
# Frontend Service (Production/Static)
frontend:
build:
context: ./frontend/control-panel
dockerfile: Dockerfile
container_name: mimic_lab_frontend
restart: always
ports:
- "3000:80"
depends_on:
- backend
# NEW: Frontend Dev Service (for hot-reloading)
frontend-dev:
image: node:22-alpine
container_name: mimic_lab_frontend_dev
working_dir: /app
volumes:
- ./frontend/control-panel:/app
ports:
- "5173:5173"
environment:
- VITE_API_URL=http://localhost:8000
command: sh -c "npm install && npm run dev -- --host"
depends_on:
- backend
# Redis Service (Pub/Sub for Live Data)
redis:
image: redis:alpine
container_name: mimic_lab_redis
restart: always
ports:
- "6379:6379"
# Market Depth Service (TrueData WebSocket -> Redis)
market-depth:
build:
context: .
dockerfile: Dockerfile.backend
container_name: mimic_lab_market_depth
restart: always
environment:
- DATABASE_URL=mysql+pymysql://root:root@db/bharatquant_sniper
- REDIS_HOST=redis
- ENABLE_AUTO_TRADING=false
env_file: .env
command: python3 -m src.services.market_depth_service_v2
depends_on:
- db
- redis
volumes:
- ./src:/app/src
- ./data:/app/data
# Signal Generator Service (Strategy Loop)
# signal-generator:
# build:
# context: .
# dockerfile: Dockerfile.backend
# container_name: mimic_lab_signal_generator
# restart: always
# environment:
# - DATABASE_URL=mysql+pymysql://root:root@db/bharatquant_sniper
# - REDIS_HOST=redis
# env_file: .env
# command: python3 -m src.services.signal_generator
# depends_on:
# - db
# - redis
# - market-depth
# volumes:
# - ./src:/app/src
# - ./data:/app/data
# Order Flow Orchestrator (Live Institutional Pattern Detection)
# orderflow-orchestrator:
# build:
# context: .
# dockerfile: Dockerfile.backend
# container_name: mimic_lab_orderflow_orchestrator
# restart: always
# environment:
# - DATABASE_URL=mysql+pymysql://root:root@db/bharatquant_sniper
# - REDIS_HOST=redis
# env_file: .env
# command: python3 -m src.services.orderflow_orchestrator
# depends_on:
# - db
# - redis
# - market-depth
# volumes:
# - ./src:/app/src
# - ./data:/app/data
volumes:
db_data:
networks:
default:
name: mimic_lab_network
driver: bridge