api-client/README.md

79 lines
1.9 KiB
Markdown
Raw Normal View History

2026-05-06 07:57:24 +00:00
# Hoppscotch AIO
2019-11-02 21:59:31 +00:00
2026-05-06 07:57:24 +00:00
Fork interne de Hoppscotch réduit au déploiement self-host all-in-one pour
Coolify.
2019-11-02 21:59:31 +00:00
2026-05-06 07:57:24 +00:00
## Contenu conservé
2019-08-21 13:18:20 +00:00
2026-05-06 07:57:24 +00:00
- 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`
2026-05-06 07:57:24 +00:00
## Déploiement Coolify
2020-09-23 08:04:02 +00:00
2026-05-06 07:57:24 +00:00
Utiliser `docker-compose.yml` comme source Compose.
2020-09-23 08:04:02 +00:00
2026-05-06 07:57:24 +00:00
Services créés :
2019-08-21 13:18:20 +00:00
2026-05-06 07:57:24 +00:00
- `hoppscotch-aio` : image AIO construite depuis `prod.Dockerfile`, target
`aio`
- `hoppscotch-db` : PostgreSQL 15 avec volume persistant
2019-08-21 13:18:20 +00:00
2026-05-06 07:57:24 +00:00
Ports exposés :
2019-08-21 13:18:20 +00:00
2026-05-06 07:57:24 +00:00
- `3080` -> Caddy AIO HTTP
- `3000` -> app web
- `3100` -> admin
- `3170` -> backend
- `3200` -> serveur de bundles webapp
2020-12-21 18:26:35 +00:00
2026-05-06 07:57:24 +00:00
Variables minimales à vérifier dans Coolify :
2020-06-12 07:39:58 +00:00
2026-05-06 07:57:24 +00:00
```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
```
2019-08-27 07:32:44 +00:00
2026-05-06 07:57:24 +00:00
`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`.
2020-06-12 07:39:58 +00:00
2026-05-06 07:57:24 +00:00
## Local
2019-08-27 07:32:44 +00:00
2026-05-06 07:57:24 +00:00
Créer le fichier `.env` si nécessaire :
2019-08-27 07:32:44 +00:00
2026-05-06 07:57:24 +00:00
```sh
cp .env.example .env
```
2020-12-21 18:26:35 +00:00
2026-05-06 07:57:24 +00:00
Démarrer l'AIO local :
2019-09-04 02:05:47 +00:00
2026-05-06 07:57:24 +00:00
```sh
docker compose up -d --build
```
2019-08-27 07:32:44 +00:00
2026-05-06 07:57:24 +00:00
Voir les logs :
2020-12-21 18:26:35 +00:00
2026-05-06 07:57:24 +00:00
```sh
docker compose logs -f
```
2026-05-06 07:57:24 +00:00
Arrêter :
2026-05-06 07:57:24 +00:00
```sh
docker compose down
```