Run locally like the sibling apps: fixed ports, the pod provider in Docker, the app outside

Festipod now follows the local convention of welcometomyplace, mutual-aid.app
and portejunes: one fixed port pair per app (Festipod defaults: backend 3005,
app 4005; pod provider 3000/5000), overridable in backend/.env and .env.
`make start` runs docker-compose-dev.yml (the local pod provider from images,
Fuseki, Redis, mailcatcher, Arena); the backend and the app run outside Docker
with `cd backend && pnpm dev` and `pnpm dev`. pnpm stays the package manager.

The old docker-compose.yml, which containerized Festipod's own frontend and
backend and could not reach the host's Fuseki and Redis, is gone; portless is
dropped from the dev script, since the backend declares a single OIDC redirect
URI. The local backend runs without a Redis cache, as the sibling apps do. The
e2e suites and validate read the app, backend and pod provider URLs from the
env files instead of hardcoding them.

The deployment and local cookbook leaves record the traps met while resetting
datasets: a dataset re-created under the same name needs a Fuseki restart
(ClosedException otherwise), the anonymous WebACL probe at boot is expected,
and a change of the backend's URL leaves persistent accounts with a
participations collection the new app identity cannot control.
This commit is contained in:
Sylvain Duchesne
2026-11-01 11:40:27 +01:00
parent 908f7ea973
commit 5e3e821e2a
33 changed files with 280 additions and 129 deletions
+5 -36
View File
@@ -1,7 +1,7 @@
# Festipod — variables d'environnement (exemple)
#
# Copier en `.env` et renseigner les valeurs.
# En dev (`bun run dev`) ET en prod (`bun run start`), l'app sert depuis src/ et
# En dev (`pnpm dev`) ET en prod (`bun run start`), l'app sert depuis src/ et
# lit ces variables au RUNTIME (via l'endpoint /festipod-config.json de src/index.ts).
#
# REQUIS POUR LES TESTS. La suite Cucumber tourne sous `node` (pas sous Bun), qui
@@ -37,48 +37,17 @@ FESTIPOD_SHARED_WALLET_FILE_BASE64=
FESTIPOD_AUTO_SEED=
# ── Serveur ────────────────────────────────────────────────────────────────
# Port HTTP du serveur (4000 : l'app est servie sur l'origine :4000 de la pile locale).
PORT=4000
# Port HTTP du serveur (4005 : l'app Festipod, paire 3005/4005 des apps sœurs).
PORT=4005
# NODE_ENV=production bascule `bun run start` (pas de HMR). En dev, laisser vide.
NODE_ENV=
# ── Backend ActivityPods ───────────────────────────────────────────────────
# URL publique du backend Festipod (écoute sur le port 3003).
SEMAPPS_HOME_URL=http://localhost:3003
# URL publique du frontend (utilisée par le backend pour les OIDC redirects, etc.)
SEMAPPS_FRONT_URL=http://localhost:4000
# Endpoint SPARQL du Fuseki auquel se connecte le backend.
SEMAPPS_SPARQL_ENDPOINT=http://localhost:3030/
# Dataset Jena/Fuseki principal utilisé par le backend.
SEMAPPS_MAIN_DATASET=festipod
# Identifiants Jena/Fuseki.
SEMAPPS_JENA_USER=admin
SEMAPPS_JENA_PASSWORD=admin
# Redis : cache (db 3) et file des jobs (db 4).
SEMAPPS_REDIS_CACHE_URL=redis://localhost:6390/3
SEMAPPS_QUEUE_SERVICE_URL=redis://localhost:6390/4
# Dataset utilisé par le service auth.account.
SEMAPPS_AUTH_ACCOUNTS_DATASET_NAME=settings-festipod
# Dépôt de shapes/shapetrees utilisé pour déclarer les besoins d'accès.
SEMAPPS_SHAPE_REPOSITORY_URL=https://shapes.activitypods.org/
# Nom et description de l'application (backend).
SEMAPPS_APP_NAME=Festipod
SEMAPPS_APP_DESCRIPTION=Points de rencontre sur les événements publics
SEMAPPS_APP_LANG=en,fr
SEMAPPS_PORT=3003
# Le backend lit son propre backend/.env (voir backend/.env.example).
# ── Frontend / Backend coupling ────────────────────────────────────────────
# URL du backend telle que vue par le navigateur.
VITE_BACKEND_URL=http://localhost:3003
VITE_BACKEND_URL=http://localhost:3005
# Client ID OAuth/Solid du backend (laisser vide pour dériver `${VITE_BACKEND_URL}/as/actor/app`).
# Le client_id DOIT être l'URI de l'acteur app : le pod enregistre l'app sous cette URI et