Add the service the serves status.ente.io
This commit is contained in:
parent
19799957c0
commit
2486a94d21
39
infra/services/status/README.md
Normal file
39
infra/services/status/README.md
Normal file
|
@ -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
|
||||||
|
```
|
19
infra/services/status/uptime-kuma.conf
Normal file
19
infra/services/status/uptime-kuma.conf
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
16
infra/services/status/uptime-kuma.service
Normal file
16
infra/services/status/uptime-kuma.service
Normal file
|
@ -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
|
Loading…
Reference in a new issue