- Definition of extra eveai_ops service to run (db) jobs

- Definition of manifests for all jobs
- Definition of manifests for all eveai services
This commit is contained in:
Josako
2025-09-03 15:20:54 +02:00
parent 898bb32318
commit 2a0c92b064
34 changed files with 1345 additions and 26 deletions

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -Eeuo pipefail
log() { echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] $*"; }
fail() { echo "ERROR: $*" >&2; exit 1; }
# Env requirements
REQUIRED_VARS=(DB_HOST DB_PORT DB_NAME DB_USER DB_PASS)
for v in "${REQUIRED_VARS[@]}"; do : "${!v:?$v required}"; done
export PROJECT_DIR="${PROJECT_DIR:-/app}"
export FLASK_APP="${FLASK_APP:-${PROJECT_DIR}/scripts/run.py}"
export COMPONENT_NAME="${COMPONENT_NAME:-eveai_app}"
export PYTHONPATH="${PYTHONPATH:-${PROJECT_DIR}:${PYTHONPATH-}}"
export PGPASSWORD="$DB_PASS"
log "Applying Alembic migrations to the tenant schemas (single run handling all tenants)..."
flask db upgrade -d "${PROJECT_DIR}/migrations/tenant"
log "Finished applying migrations to the tenant schemas."