tailscale-docker/docker-compose-example/docker-compose.yml

20 lines
1 KiB
YAML
Raw Normal View History

services:
tailscale:
image: ghcr.io/jbowdre/tailscale-docker:latest
2024-01-01 16:44:04 -06:00
restart: unless-stopped
container_name: tailscale
environment:
2023-12-28 22:20:00 -06:00
TS_AUTHKEY: ${TS_AUTHKEY:?err} # from https://login.tailscale.com/admin/settings/authkeys
TS_HOSTNAME: ${TS_HOSTNAME:-ts-docker} # optional hostname to use for this node
TS_STATE_DIR: "/var/lib/tailscale/" # store ts state in a local volume
2023-12-29 21:58:39 -06:00
TS_TAILSCALED_EXTRA_ARGS: ${TS_TAILSCALED_EXTRA_ARGS:-} # optional extra args to pass to tailscaled
TS_EXTRA_ARGS: ${TS_EXTRA_ARGS:-} # optional extra flags to pass to tailscale up
TS_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80')
TS_FUNNEL: ${TS_FUNNEL:-} # if set, serve publicly with tailscale funnel
volumes:
2023-12-30 14:31:18 -06:00
- ./ts_data:/var/lib/tailscale/ # the mountpoint should match TS_STATE_DIR
myservice:
image: nginxdemos/hello
2024-01-01 16:44:04 -06:00
restart: unless-stopped
2023-12-30 14:25:44 -06:00
network_mode: "service:tailscale" # use the tailscale network service's network