fix(tubearchivist): use startup wrapper script like Docker
Move Django management commands (migrate, collectstatic, ta_envcheck, ta_connection, ta_startup) into run.sh startup wrapper that: - Waits up to 60s for ElasticSearch to be healthy - Runs all init commands before starting uvicorn - Matches Docker's run.sh approach This fixes ta_startup failing during install because ES wasn't ready. The commands now run at every service start with ES readiness check.
This commit is contained in:
@@ -59,15 +59,6 @@ function update_script() {
|
||||
mv /opt/tubearchivist_env.bak /opt/tubearchivist/.env
|
||||
msg_ok "Restored Configuration"
|
||||
|
||||
msg_info "Running Migrations"
|
||||
set -a
|
||||
source /opt/tubearchivist/.env
|
||||
set +a
|
||||
cd /opt/tubearchivist/backend
|
||||
$STD /opt/tubearchivist/.venv/bin/python manage.py migrate
|
||||
$STD /opt/tubearchivist/.venv/bin/python manage.py collectstatic --noinput -c
|
||||
msg_ok "Ran Migrations"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start tubearchivist tubearchivist-celery tubearchivist-beat
|
||||
systemctl reload nginx
|
||||
|
||||
Reference in New Issue
Block a user