Add uptime kuma

This commit is contained in:
2025-08-15 18:40:40 +00:00
parent 258c204163
commit 4fba524f00
9 changed files with 68 additions and 1 deletions

View File

@@ -46,3 +46,7 @@ IMMICH_DOMAIN=
IMMICH_CRT=
IMMICH_KEY=
############# Uptime Kuma #############
UPTIME_KUMA_DOMAIN=
UPTIME_KUMA_CRT=
UPTIME_KUMA_KEY=

View File

@@ -171,6 +171,24 @@
}
}
############## uptime-kuma ##############
{$UPTIME_KUMA_DOMAIN} {
tls /etc/ssl/custom/{$UPTIME_KUMA_CRT} /etc/ssl/custom/{$UPTIME_KUMA_KEY}
request_body {
max_size 1024MB
}
reverse_proxy http://uptime_kuma:3001 {
header_up X-Real-IP {http.request.header.Cf-Connecting-Ip}
header_up X-Forwarded-For {http.request.header.Cf-Connecting-Ip}
header_up X-Country-Code {http.request.header.Cf-Ipcountry}
header_up X-Forwarded-Proto {http.request.scheme}
header_up Host {http.request.host}
header_up -CF-*
}
}
import Caddyfile.private

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -35,6 +35,9 @@
- title: photos.aykhans.me
url: https://photos.aykhans.me/
icon: /assets/immich.png
- title: up.aykhans.me
url: https://up.aykhans.me/
icon: /assets/uptime_kuma.png
- title: aykhans.me
url: https://aykhans.me/
icon: /assets/ghost.png
@@ -45,12 +48,14 @@
- type: releases
cache: 1d
collapse-after: 3
collapse-after: 5
# Without authentication the Github API allows for up to 60 requests per hour. You can create a
# read-only token from your Github account settings and use it here to increase the limit.
token: ${GITHUB_TOKEN}
repositories:
- caddyserver/caddy
- louislam/uptime-kuma
- immich-app/immich
- glanceapp/glance
- go-gitea/gitea
- drakkan/sftpgo

19
main.sh
View File

@@ -62,6 +62,7 @@ generate_env_files() {
cp --update=none ./glance/.env.example ./glance/.env
cp --update=none ./ghost/.env.example ./ghost/.env
cp --update=none ./immich/.env.example ./immich/.env
cp --update=none ./uptime_kuma/.env.example ./uptime_kuma/.env
cp --update=none ./caddy/Caddyfile.private.example ./caddy/Caddyfile.private
# cp --update=none ./slash/.env.example ./slash/.env
# cp --update=none ./grafana/.env.example ./grafana/.env
@@ -182,6 +183,15 @@ start_services() {
exit 1
fi
echo "Starting uptime kuma..."
$DOCKER_COMPOSE_COMMAND -f ./uptime_kuma/docker-compose.yml up -d
if [ $? -eq 0 ]; then
print_success "Uptime kuma started successfully."
else
print_error "failed to start Uptime kuma!"
exit 1
fi
echo "Starting caddy..."
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml up -d
if [ $? -eq 0 ]; then
@@ -301,6 +311,15 @@ stop_services() {
exit 1
fi
echo "Stopping uptime kuma..."
$DOCKER_COMPOSE_COMMAND -f ./uptime_kuma/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Uptime kuma stopped successfully."
else
print_error "failed to stop Uptime kuma!"
exit 1
fi
echo "Stopping caddy..."
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml down
if [ $? -eq 0 ]; then

1
uptime_kuma/.env.example Normal file
View File

@@ -0,0 +1 @@
CADDY_DOMAIN=sub.example.com

2
uptime_kuma/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/data/*
!.gitkeep

View File

View File

@@ -0,0 +1,18 @@
networks:
caddy:
name: caddy
driver: bridge
external: true
services:
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime_kuma
restart: unless-stopped
volumes:
- ./data/app:/app/data
networks:
- caddy
labels:
caddy: ${CADDY_DOMAIN}
caddy.reverse_proxy: "* {{upstreams 3001}}"