[READ-ONLY] Mirror of https://github.com/mrgnw/svelte-docker-tailscale. Run svelte apps in docker with Tailscale
0

Configure Feed

Select the types of activity you want to include in your feed.

Convert to Docker configs for Tailscale serve configuration

Co-authored-by: mrgnw <2504532+mrgnw@users.noreply.github.com>

+12 -25
+1 -8
README.md
··· 6 6 7 7 ```sh 8 8 # Get template files 9 - TAILNET=$(tailscale status --json | jq -r '.MagicDNSSuffix') 10 9 TEMPLATE="https://raw.githubusercontent.com/mrgnw/svelte-docker-tailscale/main" 11 10 curl -O "$TEMPLATE/Dockerfile" & \ 12 - curl -O "$TEMPLATE/compose.yml" & \ 13 - curl -O "$TEMPLATE/tailscale_serve.json" & \ 14 - (curl -s "$TEMPLATE/.env.example" | tee .env) & wait 11 + curl -O "$TEMPLATE/compose.yml" & wait 15 12 16 13 # Set up Tailscale config 17 14 echo "/tailscale" >> .gitignore 18 - 19 - # Update serve.json with your domain 20 - DOMAIN="${PWD##*/}.$TAILNET" 21 - sed -i '' "s/localhost/$DOMAIN/" tailscale_serve.json 22 15 ``` 23 16 24 17 Get an auth key from [Tailscale admin console](https://login.tailscale.com/admin/settings/keys)
+11 -1
compose.yml
··· 1 + configs: 2 + tailscale-serve: 3 + content: | 4 + {"TCP":{"443":{"HTTPS":true}}, 5 + "Web":{"localhost:443": 6 + {"Handlers":{"/": 7 + {"Proxy":"http://127.0.0.1:5173"}}}}} 8 + 1 9 services: 2 10 tailscale: 3 11 image: tailscale/tailscale ··· 5 13 ports: ["${TS_PORT:-4164}:4164"] 6 14 volumes: 7 15 - ./tailscale:/var/lib/tailscale:rw 8 - - ${PWD}/tailscale_serve.json:/config/serve.json:ro 16 + configs: 17 + - source: tailscale-serve 18 + target: /config/serve.json 9 19 environment: 10 20 - TS_SERVE_CONFIG=/config/serve.json 11 21 - TS_AUTHKEY=${TS_AUTHKEY}
-16
tailscale_serve.json
··· 1 - { 2 - "TCP": { 3 - "443": { 4 - "HTTPS": true 5 - } 6 - }, 7 - "Web": { 8 - "localhost:443": { 9 - "Handlers": { 10 - "/": { 11 - "Proxy": "http://127.0.0.1:5173" 12 - } 13 - } 14 - } 15 - } 16 - }