diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1166a4a..5b654c7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -20,15 +20,6 @@ updates: patterns: ["*"] update-types: [minor, patch] - - package-ecosystem: npm - directory: /landing - schedule: - interval: weekly - groups: - landing-minor-patch: - patterns: ["*"] - update-types: [minor, patch] - - package-ecosystem: github-actions directory: / schedule: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 358ace4..c5f3a46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,38 +51,6 @@ jobs: - name: Build run: npm run build - landing: - name: Landing - runs-on: ubuntu-latest - timeout-minutes: 15 - defaults: - run: - working-directory: landing - steps: - - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - with: - persist-credentials: false - - - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 - with: - node-version: 24 - cache: npm - cache-dependency-path: landing/package-lock.json - - - name: Dépendances - run: npm ci --no-audit --no-fund - - # Bloque seulement sur une faille critique d'une dépendance de production - - name: Audit des dépendances de production - run: npm audit --omit=dev --audit-level=critical - - - name: Tests - run: npm test - - # Le build ne lit que landing/ : aucune police n'est prise dans ../frontend. - - name: Build - run: npm run build - backend: name: Backend runs-on: ubuntu-latest diff --git a/CONTRIBUTING.fr.md b/CONTRIBUTING.fr.md index 11a7158..2a64ae2 100644 --- a/CONTRIBUTING.fr.md +++ b/CONTRIBUTING.fr.md @@ -21,7 +21,6 @@ Avant d'ouvrir une pull request, faites passer ce que vérifie la CI : ```bash npm --prefix frontend ci && npm --prefix frontend run lint && npm --prefix frontend test && npm --prefix frontend run build -npm --prefix landing ci && npm --prefix landing test && npm --prefix landing run build npm --prefix backend ci && npm --prefix backend run prisma:generate && npm --prefix backend run build && npm --prefix backend test ``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e12b038..a61cf6f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,6 @@ Before opening a pull request, run what the CI checks: ```bash npm --prefix frontend ci && npm --prefix frontend run lint && npm --prefix frontend test && npm --prefix frontend run build -npm --prefix landing ci && npm --prefix landing test && npm --prefix landing run build npm --prefix backend ci && npm --prefix backend run prisma:generate && npm --prefix backend run build && npm --prefix backend test ``` diff --git a/README.fr.md b/README.fr.md index dc5d3f1..f8fdbb9 100644 --- a/README.fr.md +++ b/README.fr.md @@ -153,7 +153,7 @@ Les migrations de base de données s'appliquent toutes seules au démarrage de l ## Développer -Le dépôt contient trois projets Node : `backend/` (Fastify, Prisma, PostgreSQL, TypeScript), `frontend/` (React, Vite) et `landing/` (le site vitrine, inutile pour faire tourner l'application). Les images Docker utilisent Node 24. +Le dépôt contient deux projets Node : `backend/` (Fastify, Prisma, PostgreSQL, TypeScript) et `frontend/` (React, Vite). Les images Docker utilisent Node 24. ### Backend diff --git a/README.md b/README.md index 6258c21..70e62eb 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ Database migrations apply on their own when the API starts, and a migration cann ## Development -The repository holds three Node projects: `backend/` (Fastify, Prisma, PostgreSQL, TypeScript), `frontend/` (React, Vite) and `landing/` (the marketing site, not needed to run the app). The Docker images use Node 24. +The repository holds two Node projects: `backend/` (Fastify, Prisma, PostgreSQL, TypeScript) and `frontend/` (React, Vite). The Docker images use Node 24. ### Backend diff --git a/deploy/HOSTINGER_GITHUB_SETUP.md b/deploy/HOSTINGER_GITHUB_SETUP.md index 925f3e2..e945c74 100644 --- a/deploy/HOSTINGER_GITHUB_SETUP.md +++ b/deploy/HOSTINGER_GITHUB_SETUP.md @@ -17,7 +17,7 @@ Chaque push sur `main` lance d'abord la CI (`.github/workflows/ci.yml`). Si elle ## Ce qui vit sur le serveur, hors du dépôt - `backend/.env` : configuration de production de l'API (voir `backend/.env.production.example`) -- `/etc/parenthese/build.env` : variables de build du front et de la landing (`VITE_POSTHOG_KEY`, `VITE_POSTHOG_HOST`) +- `/etc/parenthese/build.env` : variables de build du front (`VITE_POSTHOG_KEY`, `VITE_POSTHOG_HOST`) - `/etc/cron.d/parenthese-backup` : sauvegarde nocturne par `deploy/backup.sh` - `/etc/genealogy/backup.env` (facultatif) : rétention et envoi S3 des sauvegardes - `/usr/local/sbin/parenthese-ssh-deploy` : copie de `deploy/ssh-deploy.sh`, commande forcée de la clé de déploiement (voir plus bas) diff --git a/deploy/deploy.sh b/deploy/deploy.sh index caa72ea..9414d42 100644 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -35,7 +35,7 @@ if [ ! -f "$REPO_DIR/backend/.env" ]; then exit 1 fi -# Variables de build du front et de la landing (clé PostHog), gardées sur le serveur, hors du dépôt +# Variables de build du front (clé PostHog), gardées sur le serveur, hors du dépôt if [ -f "$BUILD_ENV_FILE" ]; then set -a # shellcheck disable=SC1090 @@ -159,20 +159,9 @@ else log "Frontend inchangé" fi -# 6. Landing (autonome, plus aucune police lue dans le frontend ; frontend/src/assets reste dans le -# déclencheur par prudence, sans effet tant que rien n'y change) -if changed landing frontend/src/assets; then - install_deps landing - log "Build landing" - (cd "$REPO_DIR/landing" && npm run build) - fix_perms landing/dist -else - log "Landing inchangée" -fi - mkdir -p "$REPO_DIR/backend/storage/media" "$REPO_DIR/logs" -# 7. nginx, seulement si sa configuration a changé +# 6. nginx, seulement si sa configuration a changé if changed deploy/nginx.conf; then log "Mise à jour nginx" $SUDO install -m 644 "$REPO_DIR/deploy/nginx.conf" /etc/nginx/sites-available/parenthese @@ -181,7 +170,7 @@ if changed deploy/nginx.conf; then $SUDO systemctl reload nginx fi -# 8. API +# 7. API if [ "$BACKEND_CHANGED" = "1" ]; then command -v pm2 >/dev/null 2>&1 || { echo "ERROR: pm2 is not installed on this server."; exit 1; } cd "$REPO_DIR" @@ -193,7 +182,7 @@ if [ "$BACKEND_CHANGED" = "1" ]; then pm2 save fi -# 9. Vérification +# 8. Vérification code="000" for _ in $(seq 1 15); do code="$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:4000/health || true)" diff --git a/deploy/nginx.conf b/deploy/nginx.conf index 43653e5..aaf14b8 100644 --- a/deploy/nginx.conf +++ b/deploy/nginx.conf @@ -24,27 +24,11 @@ log_format parenthese_noquery '$remote_addr - $remote_user [$time_local] "$reque # media-src blob: lecture locale d'un fichier avant envoi # worker-src blob: compression des enregistrements posthog-js # frame-src 'self' pour les PDF servis par /api, YouTube sans cookie, carte OpenStreetMap -# frame-ancestors la landing parenthese.io intègre l'app en iframe +# frame-ancestors le site parenthese.io intègre l'app en iframe map $host $parenthese_app_csp { default "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' https://us.i.posthog.com https://us-assets.i.posthog.com; media-src 'self' blob:; worker-src 'self' blob:; frame-src 'self' https://www.youtube-nocookie.com https://www.openstreetmap.org; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'self' https://parenthese.io https://www.parenthese.io"; } -# CSP de la landing (parenthese.io), sources autorisées : -# script-src 'sha256-...' script en ligne du
(animation du logo, dans index.html et en/index.html). -# S'il change, recalculer l'empreinte : base64(sha256(contenu exact entre -# )), sinon l'animation ne se joue plus (sans autre effet). -# 2e 'sha256-...' règles de préchargement des pages ( - -