-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (65 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (65 loc) · 1.71 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
services:
# ----------------------------
# 🐍 BACKEND (Python/FastAPI)
# ----------------------------
backend:
build:
context: ./src/server
dockerfile: Dockerfile
container_name: lmtokencook-backend
ports:
- "127.0.0.1:8000:8000" # Localhost only, not public
volumes:
- ./src/server:/app # Hot-reload dev volume
networks:
- lmtokencook-net
# ----------------------------
# ⚛️ FRONTEND (React/Vite)
# ----------------------------
frontend:
build:
context: ./src/ui
dockerfile: Dockerfile
container_name: lmtokencook-frontend
ports:
- "127.0.0.1:5173:5173" # Localhost only
volumes:
- ./src/ui:/app
- /app/node_modules # Isolate node_modules inside container
environment:
# Browser runs outside container, so it hits localhost:8000 mapped port
- VITE_API_URL=http://backend:8000
depends_on:
- backend
networks:
- lmtokencook-net
# ----------------------------
# 🚦 NGINX (Reverse Proxy)
# ----------------------------
nginx:
image: nginx:alpine
container_name: lmtokencook-nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "127.0.0.1:8080:80" # Local access to the Unified Proxy
depends_on:
- frontend
- backend
networks:
- lmtokencook-net
# ----------------------------
# ☁️ CLOUDFLARE (Sidecar)
# ----------------------------
tunnel:
image: cloudflare/cloudflared:latest
container_name: lmtokencook-tunnel
restart: unless-stopped
command: tunnel --url http://nginx:80
networks:
- lmtokencook-net
depends_on:
- nginx
networks:
lmtokencook-net:
driver: bridge