mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-23 03:27:43 +09:00
Let dev.sh use another database
SERVERKIT_DEV_DATABASE_URL points the dev panel at, e.g., a throwaway sqlite file, so it starts in first-run setup like a fresh install without touching the usual dev database. The release lab's local browser journey relies on it.
This commit is contained in:
1 parent
606aa41081
commit
8affffef63
1 file changed
+3
-1
+3
-1
@@ -67,6 +67,8 @@ Environment:
|
||||
NGROK_DOMAIN Optional reserved ngrok domain
|
||||
NGROK_AUTHTOKEN Optional ngrok authtoken
|
||||
SERVERKIT_KILL_PORTS=0 Disable startup cleanup of configured dev ports
|
||||
SERVERKIT_DEV_DATABASE_URL Use another database (e.g. a throwaway sqlite
|
||||
file for a panel that starts in first-run setup)
|
||||
|
||||
Defaults:
|
||||
ServerKit uses stable non-default local ports: backend 47927, frontend 41921.
|
||||
@@ -524,7 +526,7 @@ export_dev_env() {
|
||||
|
||||
export FLASK_ENV=development
|
||||
export PORT="$BACKEND_ACTUAL_PORT"
|
||||
export DATABASE_URL="sqlite:///$BACKEND_DIR/instance/serverkit.db"
|
||||
export DATABASE_URL="${SERVERKIT_DEV_DATABASE_URL:-sqlite:///$BACKEND_DIR/instance/serverkit.db}"
|
||||
export CORS_ORIGINS="$DEV_CORS_ORIGINS"
|
||||
export VITE_API_URL="$API_URL"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user