aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorJason McCormick <jason@mfamily.org>2026-11-02 20:33:14 -0500
committerJason McCormick <jason@mfamily.org>2026-11-02 20:33:14 -0500
commit2474f6cade62ba937ff714f0aa54555f7ebc18d8 (patch)
treeb19d974158088467eea2d0bb07c9be5532ce65f5 /deploy
parent97459518fad82b19059d7e5cd796ead961c38db6 (diff)
only update when changed, add daemon
Diffstat (limited to 'deploy')
-rw-r--r--deploy/ip-echo-daemon.service16
-rw-r--r--deploy/ip.mfamily.org.nginx28
2 files changed, 44 insertions, 0 deletions
diff --git a/deploy/ip-echo-daemon.service b/deploy/ip-echo-daemon.service
new file mode 100644
index 0000000..b275067
--- /dev/null
+++ b/deploy/ip-echo-daemon.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=IP address echo service for ip.mfamily.org
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/local/bin/ip-echo-daemon
+DynamicUser=yes
+Restart=on-failure
+PrivateTmp=yes
+ProtectSystem=strict
+ProtectHome=yes
+NoNewPrivileges=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/deploy/ip.mfamily.org.nginx b/deploy/ip.mfamily.org.nginx
new file mode 100644
index 0000000..08cbeb5
--- /dev/null
+++ b/deploy/ip.mfamily.org.nginx
@@ -0,0 +1,28 @@
+server {
+ listen 80;
+ listen [::]:80;
+ server_name ip.mfamily.org;
+
+ return 301 https://$host$request_uri;
+}
+
+server {
+ listen 443 ssl;
+ listen [::]:443 ssl;
+ server_name ip.mfamily.org;
+
+ ssl_certificate /etc/letsencrypt/live/ip.mfamily.org/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/ip.mfamily.org/privkey.pem;
+
+ location = / {
+ proxy_pass http://127.0.0.1:8080/;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_pass_request_body off;
+ proxy_set_header Content-Length "";
+ }
+
+ location / {
+ return 404;
+ }
+}