mirror of
https://github.com/jbowdre/tailscale-docker.git
synced 2024-11-29 12:42:18 +00:00
7c146ab113
* Adds @rhjensen79 k8s example * Instructions in README instead of Makefile * Adds optional TAILSCALE_HOSTNAME instead of hardcoding in tailscale.sh * TAILSCALE_STATE_ARG env variable, to enable stateful-example which reuses the same ip between deployments * Fix tailscale.sh for proper `tailscale logout` on container SIGTERM * Adds github action to build image * all docker images are in the images folder. Instead of repeating in each example Co-authored-by: Robert Jensen <robert@robert-jensen.dk>
15 lines
510 B
YAML
15 lines
510 B
YAML
version: "3.9"
|
|
services:
|
|
tailscale:
|
|
build:
|
|
context: ../../images/tailscale
|
|
environment:
|
|
TAILSCALE_AUTH_KEY: ${TAILSCALE_AUTH_KEY:?err}
|
|
TAILSCALE_HOSTNAME: ${TAILSCALE_HOSTNAME:-tailscale-docker-stateful-example}
|
|
TAILSCALE_STATE_ARG: "/var/lib/tailscale_state/tailscale.state" # a file
|
|
volumes:
|
|
# a volume is used but it could be a local directory.
|
|
- /var/lib/tailscale_state/
|
|
some-service-1:
|
|
image: nginxdemos/hello
|
|
network_mode: "service:tailscale"
|