ci: workflow Forgejo Actions para publicar imagen en registry + compose por env var N8N_WEBHOOK_URL
Some checks failed
build-and-push-image / build (push) Has been cancelled
Some checks failed
build-and-push-image / build (push) Has been cancelled
This commit is contained in:
parent
4193336775
commit
f0f6db06c9
5 changed files with 67 additions and 15 deletions
31
README.md
31
README.md
|
|
@ -38,19 +38,26 @@ npm run build # typecheck + build -> dist/
|
|||
Configura la URL del webhook en `public/config.js` (runtime) o `.env`
|
||||
(`VITE_N8N_WEBHOOK_URL`). Ver `docs/N8N_CONTRACT.md` para el formato request/response.
|
||||
|
||||
## Docker (Dockge)
|
||||
## Despliegue (Forgejo Actions + Dockge)
|
||||
|
||||
El archivo de compose es `compose.yaml` (nombre que Dockge reconoce por defecto).
|
||||
En Dockge: crea un stack llamado `webchatv2` y copia el contenido del repo en su
|
||||
carpeta (`~/.dockge/stacks/webchatv2/`), o clona el repo ahí. Dockge detectará el
|
||||
`compose.yaml` y podrás levantar/compilar desde la UI.
|
||||
La imagen se construye y publica automáticamente en el **Container Registry de Forgejo**
|
||||
mediante Forgejo Actions (ver `.forgejo/workflows/build.yml`). En Dockge solo necesitas
|
||||
pegar este `compose.yaml`:
|
||||
|
||||
Por CLI equivalente:
|
||||
|
||||
```bash
|
||||
docker compose -f compose.yaml up -d --build
|
||||
```yaml
|
||||
services:
|
||||
chat-ui:
|
||||
image: forgejo.ikeforge.com/ike/webchatv2:latest
|
||||
container_name: webchatv2
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
- N8N_WEBHOOK_URL=https://n8n.ikeforge.com/webhook/chat
|
||||
```
|
||||
|
||||
Expone el sitio en `http://localhost:8080`. Para cambiar la URL del webhook sin
|
||||
reconstruir, edita `public/config.js` del repo (ya montado como volumen en
|
||||
`/usr/share/nginx/html/config.js`) y recarga la página.
|
||||
- La imagen se actualiza sola con cada push a `main` ( Forgejo Actions la reconstruye y
|
||||
publica como `forgejo.ikeforge.com/ike/webchatv2:latest`). En Dockge pulsa
|
||||
**Update / Deploy** para refrescar.
|
||||
- La URL del webhook de n8n se configura con la env var `N8N_WEBHOOK_URL` directamente
|
||||
desde el compose (sin reconstruir la imagen).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue