1 Commits
main ... sqlite

Author SHA1 Message Date
f
c83317103d fix: mariadb is optional 2026-03-31 17:33:48 -03:00
10 changed files with 18 additions and 89 deletions

View File

@ -10,8 +10,6 @@ DOMAIN=uptime-kuma.example.com
SECRET_DB_PASSWORD_VERSION=v1 SECRET_DB_PASSWORD_VERSION=v1
SECRET_DB_ROOT_PASSWORD_VERSION=v1 SECRET_DB_ROOT_PASSWORD_VERSION=v1
## Enable mariadb, otherwise sqlite will be used
#COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
# only for testing branches of uptime-kuma ## Enable mariadb
#UPTIME_KUMA_GH_REPO=<branch name> #COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"

View File

@ -1,17 +0,0 @@
---
name: "Uptime Kuma pull request template"
about: "Uptime Kuma pull request template"
---
<!--
Thank you for doing recipe maintenance work!
Please mark all checklist items which are relevant for your changes.
Please remove the checklist items which are not relevant for your changes.
Feel free to remove this comment.
-->
* [ ] I have deployed and tested my changes
* [ ] I have [updated relevant versions in `abra.sh`](https://docs.coopcloud.tech/maintainers/upgrade/#updating-versions-in-the-abrash)
* [ ] I have made my environment variable changes [backwards compatible](https://docs.coopcloud.tech/maintainers/upgrade/#backwards-compatible-environment-variable-changes)
* [ ] I ran `abra recipe lint uptime-kuma --chaos` on the PR's branch and fixed the warnings.
* [ ] I have added a [release note entry](https://docs.coopcloud.tech/maintainers/upgrade/#creating-new-release-notes)

View File

@ -1,32 +0,0 @@
# Uptime Kuma Recipe Maintenance
All contributions should be made via a pull request. This is to ensure a
certain quality and consistency, that others can rely on.
## Maintainer Responsibilities
A recipe maintainer has the following responsibilities:
- Respond to pull requests / issues within a week
- Make image security updates within a day
- Make image patch / minor updates within a week
- Make image major updates within a month
In order to fullfill these responsibilities a recipe maintainer:
- Has to watch the repository (to get notifications)
- Needs to make sure renovate is configured properly
## Pull Requests
A pull request can be merged if it is approved by at least one maintainer. For
pull requests opened by a maintainer they need to be approved by another
maintainer. Even though it is okay to merge a pull request with one approval, it
is always better if all maintainers looked at the pull request and approved it.
## Become a maintainer
Everyone can apply to be a recipe maintainer:
1. Watch the repository to always get updates
2. Simply add your self to the list in the [README.md](./README.md) and open a new pull request with the change.
3. Once the pull request gets merged you will be added to the [uptime kuma maintainers team](https://git.coopcloud.tech/org/coop-cloud/teams/uptime-kuma-maintainers).

View File

@ -1,18 +1,13 @@
# uptime-kuma # uptime-kuma
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/uptime-kuma/status.svg)](https://build.coopcloud.tech/coop-cloud/uptime-kuma) > One line description of the recipe
> A fancy self-hosted monitoring tool
<!-- metadata --> <!-- metadata -->
* **Maintainer**: [@stevensting](https://git.coopcloud.tech/stevensting) * **Category**: Apps
* **Status**: `stable` * **Status**: 0
* **Category**: Utilities
* **Features**: ?
* **Image**: [`uptime-kuma`](https://hub.docker.com/r/uptime-kuma), 4, upstream * **Image**: [`uptime-kuma`](https://hub.docker.com/r/uptime-kuma), 4, upstream
* **Healthcheck**: Yes * **Healthcheck**: No
* **Backups**: Yes * **Backups**: Yes
* **Email**: No * **Email**: No
* **Tests**: No * **Tests**: No
@ -30,7 +25,7 @@ For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
## MariaDB ## MariaDB
By default uptime-kuma uses a sqlite database. It is possible to switch to a mariadb by: By default uptime-kuma uses a sqlite database. It is possible to switch to a mariadb:
``` ```
#COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml" #COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
``` ```

View File

@ -1,4 +1,4 @@
export APP_ENTRYPOINT_VERSION=v3 export APP_ENTRYPOINT_VERSION=v2
get_all_urls() { get_all_urls() {
echo "select url from monitor" | mariadb -u kuma -p$(cat /run/secrets/db_password) -D kuma | sed 's|https://||' | sed 's|/.*||' | sort echo "select url from monitor" | mariadb -u kuma -p$(cat /run/secrets/db_password) -D kuma | sed 's|https://||' | sed 's|/.*||' | sort

View File

@ -5,9 +5,8 @@ services:
app: app:
secrets: secrets:
- db_password - db_password
networks:
- internal
environment: environment:
- UPTIME_KUMA_GH_REPO=louislam:uptime-kuma
- UPTIME_KUMA_DB_TYPE=mariadb - UPTIME_KUMA_DB_TYPE=mariadb
- UPTIME_KUMA_DB_HOSTNAME=db - UPTIME_KUMA_DB_HOSTNAME=db
- UPTIME_KUMA_DB_PORT=3306 - UPTIME_KUMA_DB_PORT=3306
@ -16,6 +15,9 @@ services:
- UPTIME_KUMA_DB_PASSWORD_FILE=/run/secrets/db_password - UPTIME_KUMA_DB_PASSWORD_FILE=/run/secrets/db_password
depends_on: depends_on:
- db - db
networks:
- internal
- proxy
db: db:
image: mariadb:11.8 image: mariadb:11.8
@ -37,19 +39,10 @@ services:
backupbot.backup.pre-hook: "mariadb-dump --single-transaction -u root -p\"$$(cat /run/secrets/db_root_password)\" kuma | gzip > /var/lib/mysql/dump.sql.gz" backupbot.backup.pre-hook: "mariadb-dump --single-transaction -u root -p\"$$(cat /run/secrets/db_root_password)\" kuma | gzip > /var/lib/mysql/dump.sql.gz"
backupbot.backup.volumes.mariadb.path: "dump.sql.gz" backupbot.backup.volumes.mariadb.path: "dump.sql.gz"
backupbot.restore.post-hook: "gzip -d /var/lib/mysql/dump.sql.gz && mariadb -u root -p\"$$(cat /run/secrets/db_root_password)\" kuma < /var/lib/mysql/dump.sql && rm -f /var/lib/mysql/dump.sql" backupbot.restore.post-hook: "gzip -d /var/lib/mysql/dump.sql.gz && mariadb -u root -p\"$$(cat /run/secrets/db_root_password)\" kuma < /var/lib/mysql/dump.sql && rm -f /var/lib/mysql/dump.sql"
healthcheck:
test: ["CMD-SHELL", 'mariadb-admin -p"$$(cat $MYSQL_ROOT_PASSWORD_FILE)" ping']
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
volumes: volumes:
mariadb: mariadb:
networks:
internal:
secrets: secrets:
db_password: db_password:
external: true external: true

View File

@ -9,7 +9,7 @@ services:
networks: networks:
- proxy - proxy
environment: environment:
- UPTIME_KUMA_GH_REPO - UPTIME_KUMA_GH_REPO=louislam:uptime-kuma
- UPTIME_KUMA_DB_TYPE=sqlite - UPTIME_KUMA_DB_TYPE=sqlite
configs: configs:
- source: app_entrypoint - source: app_entrypoint
@ -17,6 +17,9 @@ services:
mode: 0555 mode: 0555
entrypoint: /docker-entrypoint.sh entrypoint: /docker-entrypoint.sh
deploy: deploy:
update_config:
failure_action: rollback
order: start-first
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3001" - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3001"
@ -27,8 +30,7 @@ services:
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" #- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=3.0.0+2.2.1" - "coop-cloud.${STACK_NAME}.version=2.0.0+2.0.0-beta.1"
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
healthcheck: healthcheck:
test: "curl -L localhost:3001" test: "curl -L localhost:3001"
interval: 30s interval: 30s

View File

@ -24,7 +24,7 @@ file_env() {
unset "$fileVar" unset "$fileVar"
} }
#file_env "UPTIME_KUMA_DB_PASSWORD" file_env "UPTIME_KUMA_DB_PASSWORD"
# upstream startup command # upstream startup command
cd /app cd /app

View File

@ -1 +0,0 @@
In case you are currently using MariaDb instead of the internal sqlite, you need to activate the usage of compose.mariadb.yaml in your env file. (compare .env.sample) Reason for this is that the mariadb container was removed from compose.yml

View File

@ -1,9 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"reviewers": [
"stevensting"
]
}