-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (53 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
55 lines (53 loc) · 1.52 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
services:
install-backend:
image: node:22-alpine
working_dir: /var/workspace
volumes:
- ./backend:/var/workspace
command: ["npm", "install", "--no-save", "--silent"]
backend:
image: node:22-alpine
working_dir: /var/workspace
volumes:
- ./backend:/var/workspace
command: ["npm", "run", "dev"]
healthcheck:
interval: 1s
test: ["CMD-SHELL",
"node", "-c",
"node --input-type=module -e \"process.exit((await fetch('http://backend:8080/api/healthcheck')).ok === true ? 0 : 1)\""]
depends_on:
install-backend:
condition: service_completed_successfully
install-webapp:
image: node:22-alpine
working_dir: /var/workspace
volumes:
- ./webapp:/var/workspace
command: ["npm", "install", "--no-save", "--silent"]
webapp:
image: node:22-alpine
working_dir: /var/workspace
volumes:
- ./webapp:/var/workspace
command: ["npm", "run", "dev", "--", "--host", "webapp"]
healthcheck:
interval: 1s
test: ["CMD-SHELL",
"node", "-c",
"node --input-type=module -e \"process.exit((await fetch('http://webapp:5173')).ok === true ? 0 : 1)\""]
depends_on:
backend:
condition: service_healthy
install-webapp:
condition: service_completed_successfully
reverse-proxy:
build:
target: reverse-proxy
ports:
- "8080:8080"
depends_on:
backend:
condition: service_healthy
webapp:
condition: service_healthy