-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.96 KB
/
docker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.96 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
services:
cms-admin:
build:
context: . # monorepo root
dockerfile: packages/cms-admin/Dockerfile
ports:
- "4010:3010"
volumes:
# Mount the site directory so the CMS can read/write content + config
- ${SITE_DIR:-../webhouse-site}:/site
# Persistent admin-server data (registry, users, access-tokens, beam,
# goto-links). Survives container restarts + redeploys. Never put
# per-site data here — that still lives inside each site's folder.
- cms_admin_data:/data/cms-admin
env_file:
- path: .env.secrets # CMS_JWT_SECRET, ANTHROPIC_API_KEY — generated by push-secrets.sh
required: false
environment:
# Point to the mounted cms.config.ts — process.chdir() in lib/cms.ts
# resolves all relative paths (contentDir, etc.) from this file's directory
CMS_CONFIG_PATH: /site/cms.config.ts
# Uploads are written to the site's public dir so Next.js can serve them
UPLOAD_DIR: /site/public/uploads
# Admin-server data (registry, users, tokens) → persistent volume
WEBHOUSE_DATA_DIR: /data/cms-admin
NODE_ENV: production
PORT: "3010"
restart: unless-stopped
webhouse-site:
build:
context: .. # /Users/cb/Apps/webhouse/ — needed for file: dep on @webhouse/cms
dockerfile: webhouse-site/Dockerfile
ports:
- "4009:3000"
volumes:
# Mount content dir so live edits in CMS are instantly visible
- ${SITE_DIR:-../webhouse-site}/content:/app/webhouse-site/content:ro
# Mount uploads so images uploaded via admin are served by the site
- ${SITE_DIR:-../webhouse-site}/public/uploads:/app/webhouse-site/public/uploads:ro
environment:
# Tells lib/cms.ts where to find the content JSON files
CONTENT_DIR: /app/webhouse-site/content
NODE_ENV: production
PORT: "3000"
restart: unless-stopped
volumes:
cms_admin_data: