mirror of
https://github.com/jbowdre/tailscale-docker.git
synced 2024-12-22 05:32:18 +00:00
organizational cleanup
- add my docker-compose example, remove others - ditch nginx image - move tailscale image from images/tailscale to image/
This commit is contained in:
parent
8e0f743c9c
commit
d48e206786
8 changed files with 15 additions and 70 deletions
15
docker-compose-example/docker-compose.yml
Normal file
15
docker-compose-example/docker-compose.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
services:
|
||||
tailscale:
|
||||
build:
|
||||
context: ./image/
|
||||
container_name: tailscale
|
||||
environment:
|
||||
TS_AUTH_KEY: ${TS_AUTH_KEY:?err} # from https://login.tailscale.com/admin/settings/authkeys
|
||||
TS_HOSTNAME: ${TS_HOSTNAME:-ts-docker}
|
||||
TS_STATE_ARG: "/var/lib/tailscale/tailscale.state" # store ts state in a local volume
|
||||
TS_SERVE_PORT: ${TS_SERVE_PORT:-}
|
||||
volumes:
|
||||
- ./ts_data:/var/lib/tailscale/
|
||||
myservice:
|
||||
image: nginxdemos/hello
|
||||
network_mode: "service:tailscale"
|
|
@ -1,20 +0,0 @@
|
|||
version: "3.9"
|
||||
services:
|
||||
tailscale:
|
||||
build:
|
||||
context: images/tailscale
|
||||
environment:
|
||||
TAILSCALE_AUTH_KEY: ${TAILSCALE_AUTH_KEY:?err}
|
||||
TAILSCALE_HOSTNAME: ${TAILSCALE_HOSTNAME:-tailscale-docker-complex-example}
|
||||
TAILSCALE_STATE_ARG: "mem:"
|
||||
nginx:
|
||||
build:
|
||||
context: images/nginx
|
||||
depends_on:
|
||||
- service-one
|
||||
- service-two
|
||||
network_mode: "service:tailscale"
|
||||
service-one:
|
||||
image: nginxdemos/hello
|
||||
service-two:
|
||||
image: nginxdemos/hello
|
|
@ -1,14 +0,0 @@
|
|||
version: "3.9"
|
||||
services:
|
||||
tailscale:
|
||||
build:
|
||||
context: ../../images/tailscale
|
||||
environment:
|
||||
TAILSCALE_AUTH_KEY: ${TAILSCALE_AUTH_KEY:?err}
|
||||
TAILSCALE_HOSTNAME: ${TAILSCALE_HOSTNAME:-tailscale-docker-simple-example}
|
||||
TAILSCALE_STATE_ARG: "mem:"
|
||||
# (optional) set additional flags on tailscaled
|
||||
# TAILSCALE_OPT: --outbound-http-proxy-listen=localhost:1055
|
||||
some-service-1:
|
||||
image: nginxdemos/hello
|
||||
network_mode: "service:tailscale"
|
|
@ -1,15 +0,0 @@
|
|||
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"
|
|
@ -1,3 +0,0 @@
|
|||
FROM nginx:1.23
|
||||
# based on debian:bullseye-slim
|
||||
COPY conf.d /etc/nginx/conf.d
|
|
@ -1,18 +0,0 @@
|
|||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
location /service-one {
|
||||
proxy_pass http://service-one/;
|
||||
proxy_set_header Host $http_host;
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stdout;
|
||||
}
|
||||
|
||||
location /service-two {
|
||||
proxy_pass http://service-two/;
|
||||
proxy_set_header Host $http_host;
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stdout;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue