-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (66 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
69 lines (66 loc) · 1.78 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: arbradar-backend
restart: unless-stopped
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- PORT=3001
- LOG_LEVEL=info
- CACHE_TTL_TICKERS=10000
- CACHE_TTL_FUNDING_RATES=600000
- CACHE_TTL_PROCESSED_DATA=10000
- API_RATE_LIMIT_WINDOW=60000
- API_RATE_LIMIT_MAX=100
- CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,http://frontend:3000
- HEALTH_CHECK_TIMEOUT=5000
- HEALTH_CHECK_INTERVAL=30000
- DEV_ENABLE_DEBUG_LOGS=false
- DEV_ENABLE_CACHE_LOGS=false
env_file:
- ./backend/.env
volumes:
- backend_logs:/app/logs
networks:
- arbradar-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: arbradar-frontend
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=http://backend:3001
- API_URL=http://backend:3001
- PORT=3000
- HOSTNAME=0.0.0.0
depends_on:
backend:
condition: service_healthy
networks:
- arbradar-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
backend_logs:
driver: local
networks:
arbradar-network:
driver: bridge