Files
docker-compose-cookbooks/headscale_dev/compose.yaml
T
codeandClaude Sonnet 5 ab2b8c73fd headscale: serve admin UI same-origin to avoid CORS, drop Caddyfile hack
headscale-admin is a SvelteKit build with its asset base path hardcoded
to /admin, so the earlier Caddyfile root override (to serve it at /)
broke asset loading. Revert it and instead document serving the UI via
an NPM Custom Location (/admin) on the same headscale.example.com
proxy host, which also avoids CORS entirely since the browser sees one
origin for both the UI and the API it calls.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 16:15:58 +00:00

34 lines
871 B
YAML

services:
headscale:
image: ${HEADSCALE_IMAGE:-headscale/headscale:latest}
restart: ${HEADSCALE_RESTART:-unless-stopped}
volumes:
- ${VOL_PATH:-/data}/headscale/config:/etc/headscale
- ${VOL_PATH:-/data}/headscale/data:/var/lib/headscale
- ${VOL_PATH:-/data}/headscale/logs:/var/log/headscale
environment:
- TZ=${TZ:-America/Vancouver}
- HEADSCALE_LOG_LEVEL=${HEADSCALE_LOG_LEVEL:-info}
networks:
- proxy
- internal
command:
- serve
headscale-ui:
image: ${HEADSCALE_UI_IMAGE:-goodieshq/headscale-admin:latest}
restart: ${HEADSCALE_UI_RESTART:-unless-stopped}
environment:
- TZ=${TZ:-America/Vancouver}
- HEADSCALE_URL=http://headscale:8080
networks:
- proxy
- internal
depends_on:
- headscale
networks:
proxy:
external: true
internal: