-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (94 loc) · 2.21 KB
/
docker-compose.yml
File metadata and controls
98 lines (94 loc) · 2.21 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
services:
redis:
image: redis:7-alpine
container_name: audiolevel-redis
restart: always
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis-data:/data
networks:
- audiolevel-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: audiolevel-backend
restart: always
environment:
- NODE_ENV=production
- PORT=3000
- REDIS_URL=redis://redis:6379
- UPLOAD_DIR=/app/uploads
- OUTPUT_DIR=/app/outputs
- MAX_FILE_SIZE=104857600
- FILE_RETENTION_MINUTES=15
- MAX_CONCURRENT_JOBS=4
- PROCESSING_TIMEOUT_MS=300000
- CORS_ORIGINS=https://audiolevel.miikkis.fi
- LOG_LEVEL=info
- DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN
volumes:
- uploads-data:/app/uploads
- outputs-data:/app/outputs
networks:
- audiolevel-network
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_API_URL=
- VITE_WS_URL=
container_name: audiolevel-frontend
restart: always
ports:
- "8081:80"
networks:
- audiolevel-network
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '0.5'
memory: 128M
networks:
audiolevel-network:
driver: bridge
volumes:
redis-data:
driver: local
uploads-data:
driver: local
outputs-data:
driver: local