- Ajout scripts/ reproduisant chaque étape (secrets, render config, up CLI, init Garage, bootstrap prod, admin, vérif E2E, adoption Coolify, backup) - Templates envsubst (config.yml, garage.toml, cantaloupe.properties) + .example - deploy.conf (config non-secrète : domaine, versions, uuids Coolify) - docs/ : ARCHITECTURE, TROUBLESHOOTING (11 problèmes/fixes), RUNBOOK, SECURITY - Makefile (raccourcis) - .gitignore + retrait du suivi de .env/.secrets.env/config.yml/garage.toml (fichiers conservés sur disque ; secrets restent dans l'historique -> voir SECURITY.md) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
1.1 KiB
Bash
Executable File
27 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Migrations DB + équivalent PROD de `arkindex bootstrap` (dev-only) :
|
|
# crée les 2 ImageServers (uploads/ingest) avec le VRAI domaine + la farm Ponos.
|
|
source "$(dirname "$0")/lib.sh"
|
|
|
|
log "Migrations…"
|
|
dex ark-backend arkindex migrate 2>&1 | tail -2
|
|
ok "Migrations appliquées."
|
|
|
|
log "ImageServers + farm Ponos (domaine=$DOMAIN)…"
|
|
dexi ark-backend env DOMAIN="$DOMAIN" arkindex shell <<'PYEOF' 2>&1 | tail -3
|
|
import os
|
|
from arkindex.images.models import ImageServer
|
|
from arkindex.ponos.models import Farm
|
|
d = os.environ["DOMAIN"]
|
|
for sid, url, bucket, name in [
|
|
(12345, f"https://uploads.iiif.{d}/iiif/2", "uploads", "Local uploads IIIF server"),
|
|
(67890, f"https://ingest.iiif.{d}/iiif/2", "ingest", "Ingest IIIF server"),
|
|
]:
|
|
ImageServer.objects.update_or_create(id=sid, defaults=dict(url=url, s3_bucket=bucket, s3_region="local", display_name=name))
|
|
Farm.objects.update_or_create(
|
|
id="001e411a-1111-2222-3333-444455556666",
|
|
defaults=dict(name="Bootstrap farm", seed="b12868101dab84984481741663d809d2393784894d6e807ceee0bd95051bf971"))
|
|
print("ImageServers + farm OK")
|
|
PYEOF
|
|
ok "Bootstrap (prod) terminé."
|