api-client/README.md
2026-05-06 09:57:24 +02:00

78 lines
1.9 KiB
Markdown

# Hoppscotch AIO
Fork interne de Hoppscotch réduit au déploiement self-host all-in-one pour
Coolify.
## Contenu conservé
- Application web self-host : `packages/hoppscotch-selfhost-web`
- Backend NestJS et Prisma : `packages/hoppscotch-backend`
- Admin self-host : `packages/hoppscotch-sh-admin`
- Packages partagés requis au build : `hoppscotch-common`, `hoppscotch-data`,
`hoppscotch-kernel`, `hoppscotch-js-sandbox`, `codemirror-lang-graphql`
- Image Docker de production : `prod.Dockerfile`
- Déploiement Compose AIO : `docker-compose.yml`
## Déploiement Coolify
Utiliser `docker-compose.yml` comme source Compose.
Services créés :
- `hoppscotch-aio` : image AIO construite depuis `prod.Dockerfile`, target
`aio`
- `hoppscotch-db` : PostgreSQL 15 avec volume persistant
Ports exposés :
- `3080` -> Caddy AIO HTTP
- `3000` -> app web
- `3100` -> admin
- `3170` -> backend
- `3200` -> serveur de bundles webapp
Variables minimales à vérifier dans Coolify :
```env
POSTGRES_PASSWORD=<mot-de-passe-fort>
POSTGRES_DB=hoppscotch
DATA_ENCRYPTION_KEY=<chaine-de-32-caracteres>
VITE_BASE_URL=https://<domaine-app>
VITE_SHORTCODE_BASE_URL=https://<domaine-app>
VITE_ADMIN_URL=https://<domaine-admin>
VITE_BACKEND_GQL_URL=https://<domaine-backend>/graphql
VITE_BACKEND_WS_URL=wss://<domaine-backend>/graphql
VITE_BACKEND_API_URL=https://<domaine-backend>/v1
WHITELISTED_ORIGINS=https://<domaine-app>,https://<domaine-admin>
TRUST_PROXY=true
```
`DATABASE_URL` est généré par `docker-compose.yml` pour la base PostgreSQL
incluse. Si le déploiement passe plus tard sur une base externe, adapter
explicitement le service `hoppscotch-aio`.
## Local
Créer le fichier `.env` si nécessaire :
```sh
cp .env.example .env
```
Démarrer l'AIO local :
```sh
docker compose up -d --build
```
Voir les logs :
```sh
docker compose logs -f
```
Arrêter :
```sh
docker compose down
```