chore: seed multica agents on deploy
This commit is contained in:
@@ -12,6 +12,7 @@ ENV_FILE="${ENV_FILE:-${BACKEND_DIR}/env/prod.env}"
|
|||||||
BACKEND_PORT="${BACKEND_PORT:-8001}"
|
BACKEND_PORT="${BACKEND_PORT:-8001}"
|
||||||
RUN_MIGRATIONS="${RUN_MIGRATIONS:-1}"
|
RUN_MIGRATIONS="${RUN_MIGRATIONS:-1}"
|
||||||
IMPORT_INIT_DATA="${IMPORT_INIT_DATA:-auto}"
|
IMPORT_INIT_DATA="${IMPORT_INIT_DATA:-auto}"
|
||||||
|
SEED_MULTICA_AGENTS="${SEED_MULTICA_AGENTS:-1}"
|
||||||
BUILD_WEB="${BUILD_WEB:-0}"
|
BUILD_WEB="${BUILD_WEB:-0}"
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
@@ -87,6 +88,11 @@ PY
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${SEED_MULTICA_AGENTS}" = "1" ] && [ -f "scripts/seed_multica_org_agents.py" ]; then
|
||||||
|
log "seeding Multica organization agents"
|
||||||
|
ENV=prod python scripts/seed_multica_org_agents.py --apply
|
||||||
|
fi
|
||||||
|
|
||||||
log "restarting ${SERVICE_NAME}"
|
log "restarting ${SERVICE_NAME}"
|
||||||
if command -v systemctl >/dev/null 2>&1; then
|
if command -v systemctl >/dev/null 2>&1; then
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|||||||
Reference in New Issue
Block a user