From 5982eae329dcebc1ff486cf174f66d5a42fa3221 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Thu, 29 Sep 2022 15:58:47 -0300 Subject: [PATCH] Add hass exposure for smartthings connection --- Dockerfile | 2 +- nginx.conf | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) 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"; + } +} +