From 5e2b784c24d1b113658cae73b380f6b74db958f7 Mon Sep 17 00:00:00 2001 From: urieljareth Date: Mon, 26 Oct 2026 15:14:39 -0600 Subject: [PATCH] Docs: AGENTS.md con el origen real del despliegue (GitHub main, docker-compose.yaml) Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 9c2f1aa..5b62ad8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -88,7 +88,9 @@ A quoted line item is `fijo` (default), `horas`, `retainer`, or `demanda` — se ## Deployment (Coolify) -- Production stack: `docker-compose.coolify.yml` (postgres + web + api). In Coolify set **Docker Compose Location** to `/docker-compose.coolify.yml`. Local dev keeps using `docker-compose.yml` + `start.bat`. +- Production stack: postgres + web + api. The live Coolify app (`cotizador`, uuid `e6vie34d83iv5vw3eyzinl3s`, https://cotizador.urieljareth.org) has **Docker Compose Location `/docker-compose.yaml`** — the byte-identical copy — so both files must stay in sync. Local dev keeps using `docker-compose.yml` + `start.bat`. +- **Deploys come from GitHub `main` (`origin`), not Gitea.** Auto-deploy is on: a push to GitHub `main` *is* the deploy (~15 min full build). Pushing to `gitea` only mirrors the code. Don't also trigger the deploy API after a push, or two deploys race. +- `NEXT_PUBLIC_APP_URL` must be set in Coolify: email and push links fall back to `http://localhost:3000` without it. - The `web` container runs `prisma migrate deploy` on every start, and the seed only when `RUN_SEED=true`. Seed users/passwords come from `SEED_*` env vars (see `.env.example`) — `prisma/seed.ts` never overwrites an existing password unless the env var is set. - `DATABASE_URL` is only used by the Prisma CLI (migrations); the apps use individual `DB_*` vars. Both must point to the same DB. - Healthchecks: web `GET /api/health` (public in middleware, pings DB), api `GET /health`.