-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
54 lines (50 loc) · 1.79 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
54 lines (50 loc) · 1.79 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
# ---------------------------------------------------------------------------
# memeforge — dev stack: hot reload on both sides, source bind-mounted.
#
# docker compose -f docker-compose.dev.yml up --build
#
# - server: same production image, command overridden with `uvicorn --reload`;
# ./server is bind-mounted to /app, so rendered videos land in
# ./server/outputs on the host and server/.env is honored via the mount.
# - web: ./web -> /app (`next dev` dev target). Container-native node_modules
# live in /opt/node_modules so host mounts never shadow them.
# ---------------------------------------------------------------------------
name: memeforge-dev
services:
server:
build:
context: ./server
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
ports:
- "8000:8000"
environment:
MEMEFORGE_CORS_ORIGINS: ${MEMEFORGE_CORS_ORIGINS:-}
# Force polling if hot reload misses host-side edits on some
# Docker Desktop / filesystem combinations.
WATCHFILES_FORCE_POLLING: ${WATCHFILES_FORCE_POLLING:-0}
volumes:
- ./server:/app
healthcheck:
test: ["CMD", "python", "-c", "import sys,urllib.request;sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/health',timeout=4).status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
web:
build:
context: ./web
target: dev
image: memeforge-web-dev
ports:
- "3000:3000"
environment:
# Read at runtime by `next dev` (no rebuild needed when it changes).
NEXT_PUBLIC_SERVER_URL: ${NEXT_PUBLIC_SERVER_URL:-http://localhost:8000}
volumes:
- ./web:/app
- web_next:/app/.next
depends_on:
server:
condition: service_healthy
volumes:
web_next: