-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (84 loc) · 2.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (84 loc) · 2.09 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
services:
deps:
image: node:22-alpine
working_dir: /workspace
volumes:
- .:/workspace
- node-modules:/workspace/node_modules
command: sh -c "npm ci"
web:
image: node:22-alpine
working_dir: /workspace
command: sh -c "npm run dev:web"
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_SERVER_URL: http://localhost:4000
NEXT_PUBLIC_API_URL: http://localhost:4000
NEXT_PUBLIC_SOCKET_URL: http://localhost:4000
volumes:
- .:/workspace
- node-modules:/workspace/node_modules
depends_on:
deps:
condition: service_completed_successfully
server:
condition: service_started
server:
image: node:22-alpine
working_dir: /workspace
command: sh -c "npm run dev:server"
ports:
- "4000:4000"
environment:
PORT: 4000
NODE_ENV: development
MONGODB_URI: mongodb://mongo:27017/codedock
JWT_SECRET: change-me
CORS_ORIGIN: http://localhost:3000
RUNNER_URL: http://runner:5000
volumes:
- .:/workspace
- node-modules:/workspace/node_modules
depends_on:
deps:
condition: service_completed_successfully
mongo:
condition: service_healthy
runner:
condition: service_started
runner:
image: node:22-alpine
working_dir: /workspace
command: sh -c "npm run dev:runner"
ports:
- "5001:5000"
environment:
PORT: 5000
NODE_ENV: development
EXEC_TIMEOUT_MS: 5000
MAX_OUTPUT_BYTES: 100000
PYTHON_IMAGE: python:3.12-alpine
volumes:
- .:/workspace
- node-modules:/workspace/node_modules
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
deps:
condition: service_completed_successfully
mongo:
image: mongo:8
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping')"]
interval: 30s
timeout: 5s
retries: 8
start_period: 15s
volumes:
mongo-data:
node-modules: