-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (59 loc) · 1.99 KB
/
docker-compose.yml
File metadata and controls
61 lines (59 loc) · 1.99 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
services:
# Frontend service
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:4008}
NEXT_PUBLIC_WS_URL: ${NEXT_PUBLIC_WS_URL:-ws://localhost:4009}
NEXT_PUBLIC_API_KEY: ${NEXT_PUBLIC_API_KEY:-}
container_name: 08-quantum-trading-frontend
ports:
- "${HOST_FRONTEND_PORT:-3008}:3000"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:4008}
- NEXT_PUBLIC_WS_URL=${NEXT_PUBLIC_WS_URL:-ws://localhost:4009}
- NEXT_PUBLIC_API_KEY=${NEXT_PUBLIC_API_KEY:-}
depends_on:
- backend
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
# Backend service
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: 08-quantum-trading-backend
ports:
- "${HOST_BACKEND_PORT:-4008}:3001"
- "${HOST_WS_PORT:-4009}:3002"
environment:
- NODE_ENV=production
- API_PORT=3001
- WS_PORT=3002
- API_AUTH_MODE=${API_AUTH_MODE:-required}
- API_STATIC_KEY=${API_STATIC_KEY:-}
- MARKET_DATA_PROVIDER=${MARKET_DATA_PROVIDER:-binance}
- BINANCE_TESTNET=${BINANCE_TESTNET:-true}
- BINANCE_SPOT_REST_BASE_URL=${BINANCE_SPOT_REST_BASE_URL:-}
- RATE_LIMIT_WINDOW_MS=${RATE_LIMIT_WINDOW_MS:-60000}
- RATE_LIMIT_MAX_REQUESTS=${RATE_LIMIT_MAX_REQUESTS:-100}
- ENABLE_WEBSOCKET=${ENABLE_WEBSOCKET:-false}
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:3008}
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
default:
name: 08-quantum-trading-network