diff --git a/Dockerfile b/Dockerfile index 244bc6a..92874bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ COPY . ./ FROM alpine:latest as tailscale WORKDIR /app COPY . ./ -ENV TSFILE=tailscale_1.24.2_amd64.tgz +ENV TSFILE=tailscale_1.28.0_amd64.tgz RUN wget https://pkgs.tailscale.com/stable/${TSFILE} && tar xzf ${TSFILE} --strip-components=1 COPY . ./ diff --git a/nginx.conf b/nginx.conf index 293433f..107ad45 100644 --- a/nginx.conf +++ b/nginx.conf @@ -51,3 +51,21 @@ server { internal; } } + +server { + listen 8080; + listen [::]:8080; + + server_name hass.ralsina.me; + + location / { + proxy_pass http://pinky.ralsina.github.beta.tailscale.net:8123; + proxy_set_header X-Forwarded-Host $http_host; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +} +