π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add the service the serves status.ente.io
Manav Rathi2486a94d2198
diff --git a/infra/services/status/README.md b/infra/services/status/README.mdnew file mode 100644index 0000000000..51166f424a--- /dev/null+++ b/infra/services/status/README.md@@ -0,0 +1,39 @@+# Status++Our status page ([status.ente.io](https://status.ente.io)) is a self-hosted+[Uptime Kuma](https://github.com/louislam/uptime-kuma).++## Installing++Install [nginx](../nginx/README.md).++Create a directory where Uptime Kuma will keep its state. This is the directory+we can optionally backup if we wish to preserve history and settings when moving+instances in the future.++```sh+sudo mkdir -p /root/uptime-kuma+```++Add the service definition and nginx configuration.++```sh+scp services/status/uptime-kuma.* <instance>:++sudo mv uptime-kuma.service /etc/systemd/system/uptime-kuma.service+sudo mv uptime-kuma.nginx.conf /root/nginx/conf.d+```++Tell systemd to pick up new service definitions, enable the unit (so that it+automatically starts on boot), and start it this time around.++```sh+sudo systemctl daemon-reload+sudo systemctl enable --now uptime-kuma+```++Restart nginx++```sh+sudo systemctl restart nginx+```diff --git a/infra/services/status/uptime-kuma.conf b/infra/services/status/uptime-kuma.confnew file mode 100644index 0000000000..6c3b08b332--- /dev/null+++ b/infra/services/status/uptime-kuma.conf@@ -0,0 +1,19 @@+# This file gets loaded in a top level http block by the default nginx.conf+# See infra/services/nginx/README.md for more details.++server {+ listen 443 ssl http2;+ listen [::]:443 ssl http2;+ ssl_certificate /etc/ssl/certs/cert.pem;+ ssl_certificate_key /etc/ssl/private/key.pem;++ server_name status.ente.io;++ location / {+ proxy_pass http://host.docker.internal:3001;+ proxy_set_header Host $host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ proxy_set_header X-Forwarded-Proto $scheme;+ }+}diff --git a/infra/services/status/uptime-kuma.service b/infra/services/status/uptime-kuma.servicenew file mode 100644index 0000000000..11789d8c48--- /dev/null+++ b/infra/services/status/uptime-kuma.service@@ -0,0 +1,16 @@+[Unit]+Documentation=https://github.com/louislam/uptime-kuma+Requires=docker.service+After=docker.service++[Install]+WantedBy=multi-user.target++[Service]+ExecStartPre=docker pull louislam/uptime-kuma:1+ExecStartPre=-docker stop uptime-kuma+ExecStartPre=-docker rm uptime-kuma+ExecStart=docker run --name uptime-kuma \+ -p 3001:3001 \+ -v /root/uptime-kuma:/app/data \+ louislam/uptime-kuma:1