-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (87 loc) · 1.89 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (87 loc) · 1.89 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
services:
runner:
build:
context: ./runner
dockerfile: Dockerfile
restart: unless-stopped
stop_grace_period: 5s
container_name: gopherlab-runner
mem_limit: 768m
cpus: '1.0'
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
pids_limit: 256
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8081/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- backend
terminal:
build:
context: ./terminal
dockerfile: Dockerfile
restart: unless-stopped
stop_grace_period: 5s
container_name: gopherlab-terminal
mem_limit: 512m
cpus: '1.0'
security_opt:
- no-new-privileges:true
pids_limit: 256
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8082/health"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
networks:
- backend
# Run Go tests: docker compose --profile test run --rm runner-test
runner-test:
build:
context: ./runner
dockerfile: Dockerfile
target: test-runner
container_name: gopherlab-runner-test
mem_limit: 512m
cpus: '1.0'
profiles:
- test
gopherlab:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:80"
restart: unless-stopped
container_name: gopherlab
depends_on:
runner:
condition: service_healthy
terminal:
condition: service_healthy
networks:
- default
- backend
# Dev mode: hot reload — docker compose --profile dev up
gopherlab-dev:
image: node:20-alpine
working_dir: /app
volumes:
- .:/app
- node_modules:/app/node_modules
ports:
- "3001:3000"
command: sh -c "npm install && npm run dev"
profiles:
- dev
volumes:
node_modules:
networks:
backend:
internal: true