Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with mariadb config #4489

Closed
2 tasks done
yolabingo opened this issue Feb 13, 2024 · 2 comments
Closed
2 tasks done

Help with mariadb config #4489

yolabingo opened this issue Feb 13, 2024 · 2 comments
Labels
area:core issues describing changes to the core of uptime kuma area:deployment related to how uptime kuma can be deployed help

Comments

@yolabingo
Copy link

yolabingo commented Feb 13, 2024

⚠️ Please verify that this question has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ 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:
@yolabingo yolabingo added the help label Feb 13, 2024
@chakflying
Copy link
Collaborator

Running on mariadb is not supported for 1.X versions. 2.0 is not released yet as it is still being worked on (#4171).

@CommanderStorm
Copy link
Collaborator

This is a bit misleadingly documented indeed.
With (2.0.0) we mean that said feature is only available AFTER said version.
I don't know if/how this needs changing, since this is in the For Development only section.

We are currently in the process of finalising said release and publishing 2.0.0-beta.0
See #4171 for the bugs that still require addressing before this can happen.

@CommanderStorm CommanderStorm added area:deployment related to how uptime kuma can be deployed area:core issues describing changes to the core of uptime kuma labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core issues describing changes to the core of uptime kuma area:deployment related to how uptime kuma can be deployed help
Projects
None yet
Development

No branches or pull requests

3 participants