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:
CanbiZ (MickLesk)
2026-03-25 16:43:07 +01:00
parent 462c95ee19
commit 3bce8dd3f8
2 changed files with 25 additions and 23 deletions

View File

@@ -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