-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (31 loc) · 1.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
31 lines (31 loc) · 1.4 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
# Run the pagecast admin dashboard + local page server in a container.
#
# docker compose up --build # then open http://localhost:4173
#
# Publishing to Cloudflare from inside the container uses an API token: the
# dashboard's interactive "Connect Cloudflare" OAuth flow needs a browser the
# container does not have. Copy .env.example to .env and fill in the token to
# enable publishing / deploys.
services:
pagecast:
build: .
image: pagecast:local
# Persist config + published history across container restarts.
volumes:
- ./.pagecast:/app/.pagecast
# Map ONLY to the host loopback: browser CSRF and private local capabilities
# protect admin mutations, but Pagecast is not a remote multi-user service
# and can run shell commands. Never publish it on a routable interface.
ports:
- "127.0.0.1:4173:4173" # admin dashboard
- "127.0.0.1:4174:4174" # local published-page server
environment:
HOST: "0.0.0.0"
# Explicitly allow the container's wildcard bind. Keep the published
# admin port restricted to host loopback above.
PAGECAST_ALLOW_LOOPBACK_PROXY: "1"
# Optional — enables Cloudflare publishing from the container (see .env).
CLOUDFLARE_API_TOKEN: "${CLOUDFLARE_API_TOKEN:-}"
CLOUDFLARE_ACCOUNT_ID: "${CLOUDFLARE_ACCOUNT_ID:-}"
# `serve` is the image default; stated here for clarity.
command: ["serve"]