mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2025-09-01 00:33:35 +00:00
Add uptime kuma
This commit is contained in:
@@ -46,3 +46,7 @@ IMMICH_DOMAIN=
|
|||||||
IMMICH_CRT=
|
IMMICH_CRT=
|
||||||
IMMICH_KEY=
|
IMMICH_KEY=
|
||||||
|
|
||||||
|
############# Uptime Kuma #############
|
||||||
|
UPTIME_KUMA_DOMAIN=
|
||||||
|
UPTIME_KUMA_CRT=
|
||||||
|
UPTIME_KUMA_KEY=
|
||||||
|
@@ -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
|
import Caddyfile.private
|
||||||
|
BIN
glance/assets/uptime_kuma.png
Normal file
BIN
glance/assets/uptime_kuma.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
@@ -35,6 +35,9 @@
|
|||||||
- title: photos.aykhans.me
|
- title: photos.aykhans.me
|
||||||
url: https://photos.aykhans.me/
|
url: https://photos.aykhans.me/
|
||||||
icon: /assets/immich.png
|
icon: /assets/immich.png
|
||||||
|
- title: up.aykhans.me
|
||||||
|
url: https://up.aykhans.me/
|
||||||
|
icon: /assets/uptime_kuma.png
|
||||||
- title: aykhans.me
|
- title: aykhans.me
|
||||||
url: https://aykhans.me/
|
url: https://aykhans.me/
|
||||||
icon: /assets/ghost.png
|
icon: /assets/ghost.png
|
||||||
@@ -45,12 +48,14 @@
|
|||||||
|
|
||||||
- type: releases
|
- type: releases
|
||||||
cache: 1d
|
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
|
# 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.
|
# read-only token from your Github account settings and use it here to increase the limit.
|
||||||
token: ${GITHUB_TOKEN}
|
token: ${GITHUB_TOKEN}
|
||||||
repositories:
|
repositories:
|
||||||
- caddyserver/caddy
|
- caddyserver/caddy
|
||||||
|
- louislam/uptime-kuma
|
||||||
|
- immich-app/immich
|
||||||
- glanceapp/glance
|
- glanceapp/glance
|
||||||
- go-gitea/gitea
|
- go-gitea/gitea
|
||||||
- drakkan/sftpgo
|
- drakkan/sftpgo
|
||||||
|
19
main.sh
19
main.sh
@@ -62,6 +62,7 @@ generate_env_files() {
|
|||||||
cp --update=none ./glance/.env.example ./glance/.env
|
cp --update=none ./glance/.env.example ./glance/.env
|
||||||
cp --update=none ./ghost/.env.example ./ghost/.env
|
cp --update=none ./ghost/.env.example ./ghost/.env
|
||||||
cp --update=none ./immich/.env.example ./immich/.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 ./caddy/Caddyfile.private.example ./caddy/Caddyfile.private
|
||||||
# cp --update=none ./slash/.env.example ./slash/.env
|
# cp --update=none ./slash/.env.example ./slash/.env
|
||||||
# cp --update=none ./grafana/.env.example ./grafana/.env
|
# cp --update=none ./grafana/.env.example ./grafana/.env
|
||||||
@@ -182,6 +183,15 @@ start_services() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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..."
|
echo "Starting caddy..."
|
||||||
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml up -d
|
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml up -d
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
@@ -301,6 +311,15 @@ stop_services() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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..."
|
echo "Stopping caddy..."
|
||||||
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml down
|
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml down
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
1
uptime_kuma/.env.example
Normal file
1
uptime_kuma/.env.example
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CADDY_DOMAIN=sub.example.com
|
2
uptime_kuma/.gitignore
vendored
Normal file
2
uptime_kuma/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/data/*
|
||||||
|
!.gitkeep
|
0
uptime_kuma/data/.gitkeep
Normal file
0
uptime_kuma/data/.gitkeep
Normal file
18
uptime_kuma/docker-compose.yml
Normal file
18
uptime_kuma/docker-compose.yml
Normal 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}}"
|
Reference in New Issue
Block a user