-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.15 KB
/
docker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.15 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
services:
# -- Backend: FastAPI + AsyncSSH ---------------------------------------------
backend:
build:
context: .
dockerfile: Dockerfile.backend
restart: unless-stopped
# Backend is NOT exposed to the host — only reachable on the internal network
expose:
- "8000"
volumes:
- cloudshell_data:/data
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8000/api/health"]
interval: 30s
timeout: 5s
start_period: 15s
retries: 3
networks:
- internal
# -- Frontend: Nginx + React bundle + reverse proxy --------------------------
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
restart: unless-stopped
ports:
- "8080:80"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://127.0.0.1/"]
interval: 5s
timeout: 3s
start_period: 5s
retries: 5
networks:
- internal
volumes:
cloudshell_data:
networks:
# Isolated bridge — backend has no host-facing port
internal:
driver: bridge