Description
⚠️ Please verify that this question has NOT been raised before.
- I checked and didn't find similar issue
🛡️ Security Policy
- I agree to have read this project Security Policy
📝 Describe your problem
I would like to use external mariadb instead of sqlite. I think this is supported but cannot find working examples. Any guidance would be appreciated.
I tried setting UPTIME_KUMA_DB_*
environment variables in docker-compose.yml to connect to a mariadb server:
services:
uptime-kuma:
image: louislam/uptime-kuma:1.23.11-debian
container_name: uptime-kuma
ports:
- 3001:3001
depends_on:
- db
environment:
UPTIME_KUMA_DB_TYPE: mariadb
UPTIME_KUMA_DB_HOSTNAME: db
UPTIME_KUMA_DB_PORT: 3306
UPTIME_KUMA_DB_USERNAME: kumauser
UPTIME_KUMA_DB_PASSWORD: kumapass
UPTIME_KUMA_DB_NAME: kumadb
UPTIME_KUMA_IN_CONTAINER: "true"
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: kumadb
MYSQL_USER: kumauser
MYSQL_PASSWORD: kumapass
ports:
- "3306:3306"
based on https://github.com/louislam/uptime-kuma/blob/master/server/setup-database.js#L71-L81
But uptime-kuma still seems to use sqlite
[DB] INFO: Data Dir: ./data/
[DB] INFO: SQLite Version: 3.41.1
This env var
UPTIME_KUMA_ENABLE_EMBEDDED_MARIADB (2.0.0) Set 1 to enable
is mentioned in the docs https://github.com/louislam/uptime-kuma/wiki/Environment-Variables
but it is not clear to me how to use it. I would prefer to use external mariadb but at this point I'm looking for guidance on if/how I can use mariadb in any way.
Thanks in advance!
📝 Error Message(s) or Log
no errors
uptime-kuma | 2024-02-13T22:48:08Z [SERVER] INFO: Version: 1.23.11
uptime-kuma | 2024-02-13T22:48:08Z [DB] INFO: Data Dir: ./data/
uptime-kuma | 2024-02-13T22:48:08Z [SERVER] INFO: Connecting to the Database
uptime-kuma | 2024-02-13T22:48:08Z [DB] INFO: SQLite config:
uptime-kuma | [ { journal_mode: 'wal' } ]
uptime-kuma | [ { cache_size: -12000 } ]
uptime-kuma | 2024-02-13T22:48:08Z [DB] INFO: SQLite Version: 3.41.1
uptime-kuma | 2024-02-13T22:48:08Z [SERVER] INFO: Connected
uptime-kuma | 2024-02-13T22:48:08Z [DB] INFO: Your database version: 10
🐻 Uptime-Kuma Version
1.23.11
💻 Operating System and Arch
louislam/uptime-kuma:1.23.11-debian Docker container
🌐 Browser
all
🖥️ Deployment Environment
- Runtime:
- Database:
- Filesystem used to store the database on:
- number of monitors: