2023-12-28 13:33:50 -06:00
|
|
|
services:
|
|
|
|
tailscale:
|
2023-12-30 14:24:43 -06:00
|
|
|
image: ghcr.io/jbowdre/tailscale-docker:latest
|
2024-01-01 16:44:04 -06:00
|
|
|
restart: unless-stopped
|
2023-12-28 13:33:50 -06:00
|
|
|
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
|
2023-12-30 14:24:43 -06:00
|
|
|
TS_HOSTNAME: ${TS_HOSTNAME:-ts-docker} # optional hostname to use for this node
|
2023-12-29 21:36:35 -06:00
|
|
|
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
|
2023-12-28 16:20:44 -06:00
|
|
|
TS_SERVE_PORT: ${TS_SERVE_PORT:-} # optional port to proxy with tailscale serve (ex: '80')
|
2023-12-29 13:43:50 -06:00
|
|
|
TS_FUNNEL: ${TS_FUNNEL:-} # if set, serve publicly with tailscale funnel
|
2023-12-28 13:33:50 -06:00
|
|
|
volumes:
|
2023-12-30 14:31:18 -06:00
|
|
|
- ./ts_data:/var/lib/tailscale/ # the mountpoint should match TS_STATE_DIR
|
2023-12-28 13:33:50 -06:00
|
|
|
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
|