Giter Site home page Giter Site logo

Comments (4)

CommanderStorm avatar CommanderStorm commented on June 10, 2024 1

you can generate the intial databas via

export DOCKER_ID=`docker run --rm -d -v ./uptime-kuma:/app/data louislam/uptime-kuma:1 | tail -1`
sleep 60 # higher than nessesary, can be tuned 
docker stop $DOCKER_ID

from uptime-kuma.

CommanderStorm avatar CommanderStorm commented on June 10, 2024

I think this is an XY-Problem.

=> What are you trying to do in the first place? You forgot the WHY.

Reaching into the database is the most brittle way to configure us that I can think of.
You are inherently making yourself tied to a minor version and cannot expect us to respect semver for internal behaviour (such as db layout).

Tip

In case you are looking for an API, please have a look at BigBoot/AutoKuma (cli or docker automation) or uptime-kuma-api
An official REST-API is coming, but is a few releases off still. See #118 for further details

from uptime-kuma.

tedivm avatar tedivm commented on June 10, 2024

The why is simple: I want to be able to bootstrap a bunch of images at once without having to manually configure them. I'm okay with tying myself to a minor version for the initial launch.

from uptime-kuma.

tedivm avatar tedivm commented on June 10, 2024

Here's a simple use case. I would like to set the username and password for the inital admin user programmatically. The "npm run reset-password" script only works if the database is already configured.

  1. Create Database
  2. Set password using built in script
  3. Continue launching server

This use case requires no direct database changes or access, and simply uses the scripts provided to ensure the first admin users are created before opening connections up to anyone.

from uptime-kuma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.