-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 2.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (64 loc) · 2.34 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
# ---------------------------------------------------------------------------
# memeforge — full stack, production mode.
#
# docker compose up --build
#
# Dev stack (hot reload + source mounts): docker-compose.dev.yml
# ---------------------------------------------------------------------------
name: memeforge
services:
server:
build:
context: ./server
image: memeforge-server
restart: unless-stopped
ports:
- "8000:8000"
# Server-side provider keys: copy server/.env.example to server/.env
# (loaded here automatically) or pass env vars with `docker compose run`.
env_file:
- path: ./server/.env
required: false
environment:
# Extra allowed origins for browsers NOT on localhost (comma-separated).
# localhost/127.0.0.1 origins are always allowed.
MEMEFORGE_CORS_ORIGINS: ${MEMEFORGE_CORS_ORIGINS:-}
volumes:
# Rendered videos + TTS previews persist across rebuilds.
- memeforge_outputs:/app/outputs
# Drop background clips (<id>.mp4) into ./server/assets/gameplay on the
# host and they appear in the container without rebuilding.
- ./server/assets/gameplay:/app/assets/gameplay:ro
# Optional punchline SFX (host-provided, same idea as gameplay).
- ./server/assets/sfx:/app/assets/sfx:ro
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
args:
# Baked into the client bundle at build time — changing it requires
# `docker compose build web`. This is the URL the user's BROWSER uses
# to reach the API, so localhost is correct when ports are published.
NEXT_PUBLIC_SERVER_URL: ${NEXT_PUBLIC_SERVER_URL:-http://localhost:8000}
image: memeforge-web
restart: unless-stopped
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_SERVER_URL: ${NEXT_PUBLIC_SERVER_URL:-http://localhost:8000}
depends_on:
server:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:3000/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
volumes:
memeforge_outputs: