From bcbafb6f2fc356a1d351aaf787b9217667b80171 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Wed, 15 Jan 2025 17:47:41 -0600 Subject: [PATCH] add serve --- hosts/ps10rp/homepage/compose.yaml | 4 +++- hosts/ps10rp/homepage/serve.json | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 hosts/ps10rp/homepage/serve.json diff --git a/hosts/ps10rp/homepage/compose.yaml b/hosts/ps10rp/homepage/compose.yaml index e86ad307f..9a4091212 100644 --- a/hosts/ps10rp/homepage/compose.yaml +++ b/hosts/ps10rp/homepage/compose.yaml @@ -10,10 +10,12 @@ services: - TS_STATE_DIR=/var/lib/tailscale - TS_ENABLE_METRICS=true - TS_HOSTNAME=homepage-ps10rp + - TS_SERVE_CONFIG=/config/serve.json network_mode: service:homepage restart: always volumes: - tailscale:/var/lib/tailscale + - ${PWD}/serve.json:/config/serve.json devices: - /dev/net/tun:/dev/net/tun @@ -43,7 +45,7 @@ services: internal: null restart: always volumes: - - ./homepage_config:/app/config + - ${PWD}/homepage_config:/app/config networks: internal: diff --git a/hosts/ps10rp/homepage/serve.json b/hosts/ps10rp/homepage/serve.json new file mode 100644 index 000000000..a5c125e1d --- /dev/null +++ b/hosts/ps10rp/homepage/serve.json @@ -0,0 +1,19 @@ +{ + "TCP": { + "443": { + "HTTPS": true + } + }, + "Web": { + "${TS_CERT_DOMAIN}:443": { + "Handlers": { + "/": { + "Proxy": "http://127.0.0.1:3000" + } + } + } + }, + "AllowFunnel": { + "${TS_CERT_DOMAIN}:443": true + } +}