-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Generate Database without launching the server #4758
Comments
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. Tip In case you are looking for an API, please have a look at |
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. |
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.
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. |
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 |
🛡️ Security Policy
📝 Describe your problem
Is there a way to generate the database/migrations without launching the server? I'm hoping to follow this flow:
I'm not as used to javascript as I am other languages like python so I'm running into some difficulty figuring out how to just create the database. Any help would be appreciated!
📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
1.23.13
💻 Operating System and Arch
Docker
🌐 Browser
Firefox
🖥️ Deployment Environment
The text was updated successfully, but these errors were encountered: