-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
69 lines (62 loc) · 1.74 KB
/
docker-compose.yaml
File metadata and controls
69 lines (62 loc) · 1.74 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
version: '3.8'
services:
compiler_db:
image: mysql:8.0
container_name: compiler_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: compiler_root_pass
MYSQL_DATABASE: compiler
MYSQL_USER: compiler
MYSQL_PASSWORD: compiler_pass
volumes:
- compiler_db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "compiler", "-pcompiler_pass"]
interval: 5s
timeout: 5s
retries: 10
compiler_api:
build:
context: ./api
container_name: compiler_api
restart: always
privileged: true
depends_on:
compiler_db:
condition: service_healthy
ports:
- "2000:2000"
volumes:
- ./data/compiler/packages:/compiler/packages
tmpfs:
- /tmp:exec,size=1g
- /var/local/lib/isolate:size=2g,mode=755
deploy:
resources:
limits:
memory: 6144M
environment:
# 4 CPU * 2: compiled jobs are CPU-bound during compile but I/O-wait during
# isolate setup/cleanup, so 2× vCPU improves throughput without major slowdown
- COMPILER_MAX_CONCURRENT_JOBS=8
- COMPILER_LOG_LEVEL=WARN
# Timeouts (ms)
- COMPILER_RUN_TIMEOUT=10000
- COMPILER_RUN_CPU_TIME=10000
- COMPILER_COMPILE_TIMEOUT=15000
- COMPILER_COMPILE_CPU_TIME=15000
# Output va fayl o'lchamlari
- COMPILER_OUTPUT_MAX_SIZE=33554432
- COMPILER_MAX_FILE_SIZE=10485760
# Process va file descriptor limitlar
- COMPILER_MAX_PROCESS_COUNT=64
- COMPILER_MAX_OPEN_FILES=2048
# MySQL
- DB_HOST=compiler_db
- DB_PORT=3306
- DB_NAME=compiler
- DB_USER=compiler
- DB_PASSWORD=compiler_pass
volumes:
compiler_db_data: