entrypoint: Add app:init command to initialize with running server.

This can be useful for initializing a container as a separate step from running it
in production.
This commit is contained in:
Mikael Schirén
2024-09-26 00:42:45 +02:00
committed by GitHub
parent 0aac179db6
commit f44200d23b

View File

@@ -455,6 +455,11 @@ appRun() {
echo "" echo ""
exec supervisord -n -c "/etc/supervisor/supervisord.conf" exec supervisord -n -c "/etc/supervisor/supervisord.conf"
} }
appInit() {
echo "=== Running initial setup ==="
initialConfiguration
bootstrappingEnvironment
}
appManagePy() { appManagePy() {
COMMAND="$1" COMMAND="$1"
shift 1 shift 1
@@ -541,6 +546,7 @@ appHelp() {
echo "> app:restore - Restore backups of Zulip instances" echo "> app:restore - Restore backups of Zulip instances"
echo "> app:certs - Create self-signed certificates" echo "> app:certs - Create self-signed certificates"
echo "> app:run - Run the Zulip server" echo "> app:run - Run the Zulip server"
echo "> app:init - Run inital setup of Zulip server"
echo "> [COMMAND] - Run given command with arguments in shell" echo "> [COMMAND] - Run given command with arguments in shell"
} }
appVersion() { appVersion() {
@@ -555,6 +561,9 @@ case "$1" in
app:run) app:run)
appRun appRun
;; ;;
app:init)
appInit
;;
app:managepy) app:managepy)
shift 1 shift 1
appManagePy "$@" appManagePy "$@"