-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
78 lines (74 loc) · 1.83 KB
/
docker-compose.dev.yml
File metadata and controls
78 lines (74 loc) · 1.83 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
# Milestone - Development Docker Compose with Hot Reload
#
# This compose file runs:
# - milestone: FastAPI backend on port 8485
# - milestone-react-dev: React frontend on port 3333 (dev server with hot reload)
#
# Usage:
# docker compose -f docker-compose.dev.yml up -d
#
# Access:
# - React dev server: http://localhost:3333 (hot reload, but /t/* routes don't work)
# - Backend directly: http://localhost:8485 (no hot reload, but all routes work)
services:
# FastAPI Backend
milestone:
build:
context: .
dockerfile: Dockerfile
container_name: milestone
restart: unless-stopped
ports:
- "8485:8485"
env_file:
- .env
environment:
- PORT=8485
- TZ=Europe/Zurich
volumes:
- /mnt/user/appdata/milestone/uploads:/app/uploads
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8485/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- milestone-net
- guac-net
# React Frontend (Development Server with Hot Reload)
milestone-react-dev:
image: node:20-alpine
container_name: milestone-react-dev
restart: unless-stopped
working_dir: /app
ports:
- "3333:3333"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- NODE_ENV=development
- TZ=Europe/Zurich
- HTTP_PROXY=
- HTTPS_PROXY=
- http_proxy=
- https_proxy=
- NO_PROXY=*
- no_proxy=*
volumes:
- ./frontend:/app
- react_node_modules:/app/node_modules
command: >
sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 3333"
depends_on:
milestone:
condition: service_healthy
networks:
- milestone-net
networks:
milestone-net:
driver: bridge
guac-net:
external: true
volumes:
react_node_modules: