Files
scout-website/docker-compose.yml
T
Mike Wichers 1ecdb32139 Add a document shelf at /documents, served through the app
Files live outside the repo at /srv/scout-website-assets/docs (bind-mounted
read-only at /docs), the same arrangement as the photos, published by a
manifest.json beside them. Adding a document is a file drop plus a manifest
entry - the app re-reads the manifest on mtime change, so no rebuild and no
redeploy.

The manifest maps a stable slug to a filename, so next year's permission slip
can replace this year's without breaking a link already printed on a flyer.

Documents are served through /documents/{slug} rather than from a static
mount, and NOT placed under /app/static, which is public forever. That is the
point: when member login exists it plugs into documents.visible() and no
public URL moves. The visibility field already carries 'members', which today
is hidden from the index and 404s rather than 403s, since a 403 would
advertise a document we cannot yet gate.
2026-08-30 09:02:29 -04:00

43 lines
1.5 KiB
YAML

# scout-website — greenlanescouts73.org (Pack & Troop 73)
#
# Deployed as a Portainer Repository stack pointed at this repo
# (ops/portainer-stacks/00-the-rule.md in claude-workspace applies):
# - no relative bind mounts: `.` resolves to Portainer's clone, not /srv
# - no env_file: NTFY_URL comes from the Portainer stack env
# Images live OUTSIDE the repo at /srv/scout-website-assets/img (bind-mounted
# read-only) so photos never bloat clones. Documents work the same way, from
# /srv/scout-website-assets/docs mounted at /docs - NOT under /app/static,
# because they are served through the app so login can gate them later.
# The calendar comes from the scout-calendar feed (EVENTS_FEED_URL, set in
# the Portainer stack env); /data/events-cache.json is the stale fallback.
name: scout-website
services:
scout-website:
build:
context: ./app
container_name: scout-website
restart: unless-stopped
ports:
- "8132:8000"
environment:
- NTFY_URL=${NTFY_URL}
- SHEET_ID=${SHEET_ID}
- NTFY_BASE=${NTFY_BASE}
- NTFY_TOPIC=${NTFY_TOPIC}
- NTFY_TOKEN=${NTFY_TOKEN}
- ADMIN_TOKEN=${ADMIN_TOKEN}
- EVENTS_FEED_URL=${EVENTS_FEED_URL}
volumes:
- /srv/scout-website/data:/data
- /srv/scout-website/secrets/service_account.json:/app/service_account.json:ro
- /srv/scout-website-assets/img:/app/static/img:ro
- /srv/scout-website-assets/docs:/docs:ro
networks:
- default
- npm
networks:
npm:
external: true
name: arrstack_arr_net