Serve a static site at distribution.${BASE_DOMAIN} whose web root lives in
another repo (DISTRIBUTION_WEB_ROOT, bind-mounted read-only into caddy):
- caddy/conf.d/30-distribution.caddy file_server vhost
- docker-compose.distribution.yml mount snippet + external web root
- issue-letsencrypt.sh / .env.example add distribution to LE_SUBDOMAINS
- ulicraft-caddy.conf.tmpl TLS-front block proxying to caddy
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
16 lines
1.0 KiB
YAML
16 lines
1.0 KiB
YAML
# ──────────────────────────────────────────────────────────────────
|
|
# Distribution vhost — distribution.${BASE_DOMAIN}, static files from a web
|
|
# root that lives in ANOTHER repo. Layered on top of the caddy ingress.
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# docker compose -f docker-compose.yml -f docker-compose.caddy.yml \
|
|
# -f docker-compose.distribution.yml up -d
|
|
#
|
|
# DISTRIBUTION_WEB_ROOT (.env) = absolute host path to the built static site in
|
|
# the other repo. Bind-mounted read-only; caddy serves it via the
|
|
# conf.d/30-distribution.caddy snippet.
|
|
services:
|
|
caddy:
|
|
volumes:
|
|
- ./caddy/conf.d/30-distribution.caddy:/etc/caddy/conf.d/30-distribution.caddy:ro
|
|
- ${DISTRIBUTION_WEB_ROOT:?DISTRIBUTION_WEB_ROOT unset in .env}:/srv/distribution:ro
|