Déploiement sur VPS : workflow Gitea Actions, release atomique, en-têtes nginx

- .gitea/workflows/deploy.yml : build + publication à chaque push sur main
- deploy/release.sh, rollback.sh : bascule atomique par lien symbolique, 3 versions
- deploy/headers-to-nginx.mjs : dist/_headers -> nginx, sans duplication
- vite.config.ts : la garde VITE_SUPABASE_* s'applique aussi avec REQUIRE_SUPABASE=1
- README et privacy.html : hébergeur Netlify remplacé par le VPS

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
romainandClaude Sonnet 5.5 committed 2026-10-03 12:45:34 +00:00
1 parent fcc9670f29
commit e507d73982
7 files changed
+159 -15

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Revient à la version précédente (ou à celle donnée en argument). À lancer en root sur le VPS :
# /srv/azuucine/rollback.sh -> version juste avant la courante
# /srv/azuucine/rollback.sh <nom> -> une version précise (voir ls /srv/azuucine/releases)
set -euo pipefail
ROOT=${AZUUCINE_ROOT:-/srv/azuucine}
CUR=$(basename "$(readlink "$ROOT/current")")
if [ -n "${1:-}" ]; then TARGET=$1
else TARGET=$(ls -1 "$ROOT/releases" | sort -r | grep -A1 -x "$CUR" | tail -n1)
fi
[ -n "$TARGET" ] && [ "$TARGET" != "$CUR" ] && [ -d "$ROOT/releases/$TARGET" ] || { echo "aucune version cible"; exit 1; }
ln -s "releases/$TARGET" "$ROOT/current.tmp"; mv -T "$ROOT/current.tmp" "$ROOT/current"
date -u +%FT%TZ > "$ROOT/.deployed"
echo "retour : $CUR -> $TARGET"