Files
zerobyte/examples/tailscale-sidecar/compose.yaml
iven aed2c15709 Rename docker-compose.yml to compose.yaml (#935)
Aligns the project with the current Compose Specification, which
designates compose.yaml as the canonical filename and treats the
docker-compose.yml name as a legacy fallback.

Renames every compose file in the repo (the root dev/e2e stack, the
deployment examples under examples/, and the integration-test infra
stack) and updates all documentation, the integration test runner, the
capability hint messages, and the .gitattributes pattern accordingly.
No top-level version field was present to remove.

Functional behavior is unchanged: docker compose discovers either
filename, so existing deployments are not affected by the rename.

Reference: https://docs.docker.com/compose/intro/compose-application-model/
2026-06-10 20:04:00 +02:00

52 lines
1.8 KiB
YAML

services:
tailscale:
image: tailscale/tailscale:stable
container_name: zerobyte-tailscale
hostname: ${TS_HOSTNAME:-zerobyte}
restart: unless-stopped
cap_add:
- NET_ADMIN
# Optional: Some hosts require this for kernel-mode Tailscale.
# If it causes issues (common on Docker Desktop), keep it commented out (disabled as shown here).
# - SYS_MODULE
# Kernel-mode Tailscale (TS_USERSPACE=false) requires /dev/net/tun.
# If you switch to userspace mode (TS_USERSPACE=true), you MUST remove this
# devices section (or at least this mapping), otherwise the container may
# fail to start or hit runtime errors on some hosts.
devices:
- /dev/net/tun:/dev/net/tun
environment:
- TS_AUTHKEY=${TS_AUTHKEY}
- TS_STATE_DIR=/var/lib/tailscale
# Kernel-mode (false) vs userspace-mode (true).
- TS_USERSPACE=${TS_USERSPACE:-false}
# Optional flags passed to `tailscale up`.
# Examples:
# - --advertise-tags=tag:zerobyte
# - --accept-dns=true --accept-routes
- TS_EXTRA_ARGS=${TS_EXTRA_ARGS:-}
volumes:
- /var/lib/tailscale:/var/lib/tailscale
# If you only want access over Tailscale (not from the local network), remove this.
ports:
- "4096:4096"
zerobyte:
image: ghcr.io/nicotsx/zerobyte:latest
container_name: zerobyte
restart: unless-stopped
# Uncomment if you need to mount NFS/SMB/WebDAV volumes:
# cap_add:
# - SYS_ADMIN
# devices:
# - /dev/fuse:/dev/fuse
# Share the Tailscale network namespace (sidecar pattern)
network_mode: service:tailscale
depends_on:
- tailscale
environment:
- TZ=${TZ:-UTC}
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/zerobyte:/var/lib/zerobyte