mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Generate Database without launching the server #3336
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#3336
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tedivm on GitHub (May 13, 2024).
⚠️ Please verify that this question has NOT been raised before.
🛡️ 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
@CommanderStorm commented on GitHub (May 13, 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).
@tedivm commented on GitHub (May 13, 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.
@tedivm commented on GitHub (May 13, 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.
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.
@CommanderStorm commented on GitHub (May 13, 2024):
you can generate the intial databas via