diff --git a/Dockerfile b/Dockerfile index d01a39d..244bc6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,9 @@ RUN apk update && apk add --no-cache ca-certificates iptables ip6tables nginx COPY --from=builder /app/start.sh /app/start.sh COPY --from=tailscale /app/tailscaled /app/tailscaled COPY --from=tailscale /app/tailscale /app/tailscale -RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale +RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale /usr/share/nginx/html COPY nginx.conf /etc/nginx/http.d/nginx.conf +COPY custom_50x.html /usr/share/nginx/html/ # Run on container startup. EXPOSE 8080 diff --git a/custom_50x.html b/custom_50x.html new file mode 100644 index 0000000..3a7e318 --- /dev/null +++ b/custom_50x.html @@ -0,0 +1,4 @@ +
+We seem to be having some technical difficulties. Hang tight. + +
diff --git a/nginx.conf b/nginx.conf index 5a094c9..a289f4d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,6 +8,11 @@ server { proxy_pass http://pinky.ralsina.github.beta.tailscale.net:8080; proxy_set_header X-Forwarded-Host $http_host; } + error_page 500 502 503 504 /custom_50x.html; + location = /custom_50x.html { + root /usr/share/nginx/html; + internal; + } } server { @@ -21,4 +26,9 @@ server { proxy_pass http://pinky.ralsina.github.beta.tailscale.net:3000; proxy_set_header X-Forwarded-Host $http_host; } + error_page 403 404 500 502 503 504 /custom_50x.html; + location = /custom_50x.html { + root /usr/share/nginx/html; + internal; + } }