-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.react-dev.yml
More file actions
79 lines (75 loc) · 1.84 KB
/
docker-compose.react-dev.yml
File metadata and controls
79 lines (75 loc) · 1.84 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
# Milestone with React Frontend - Unraid Development Setup
#
# This compose file runs:
# - milestone-api: FastAPI backend on port 8485
# - milestone-react-dev: React frontend on port 3333 (dev server with hot reload)
#
# Usage:
# docker compose -f docker-compose.react-dev.yml up -d
#
# Access the React frontend at: http://your-unraid-ip:3333
# The React dev server proxies API requests to the backend
services:
# FastAPI Backend
milestone-api:
build:
context: .
dockerfile: Dockerfile
container_name: milestone-api
restart: unless-stopped
ports:
- "8485:8485"
extra_hosts:
- "host.docker.internal:host-gateway"
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)
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-api:
condition: service_healthy
networks:
- milestone-net
networks:
milestone-net:
driver: bridge
guac-net:
external: true
volumes:
react_node_modules: