Files
gob-alert/docs/DEPLOYMENT.md
alexandrump 82f3464565 first commit
2026-02-09 01:02:53 +01:00

47 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Despliegue en miniPCs
## Requisitos
- Docker + Docker Compose
- Postgres y Redis (opcional)
## Variables de entorno recomendadas
- `DATABASE_URL`
- `API_ADMIN_KEY`
- `JWT_SECRET`
- `INGEST_CRON`
- `ALERTS_CRON`
- `BACKUP_CRON`
- `BACKUP_DIR`
- `INGEST_ENABLED`
- `ALERTS_ENABLED`
- `BACKUP_ENABLED`
- `SMTP_HOST`, `SMTP_PORT`, `SMTP_USER`, `SMTP_PASS`, `SMTP_FROM`
- `TELEGRAM_BOT_TOKEN`, `TELEGRAM_DEFAULT_CHAT`
## Arranque rápido (todoenuno)
```bash
# Desde la raíz del repo
pnpm install
pnpm build
pnpm start
```
## Arranque con Docker Compose
```bash
docker compose build
docker compose up -d
```
## Estrategia recomendada (2 miniPCs)
1. **MiniPC 1**: ejecutar Postgres + Redis + jobs de ingesta.
2. **MiniPC 2**: ejecutar API + web + backups + alertas.
3. Definir `DATABASE_URL` apuntando al Postgres del MiniPC 1.
Sugerencia de flags:
- MiniPC 1: `INGEST_ENABLED=true`, `ALERTS_ENABLED=false`, `BACKUP_ENABLED=false`.
- MiniPC 2: `INGEST_ENABLED=false`, `ALERTS_ENABLED=true`, `BACKUP_ENABLED=true`.
## Backups
- Programados por `BACKUP_CRON`.
- Manual: `POST /admin/backup/run`.