Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
2.6 KiB
2.6 KiB
Docker Compose (Postgres only)
One file: docker-compose.yml. Compose runs Postgres 16 on host port 5433 only. API, web, and worker stay on the host via npm run setup + npm run dev (see root README.md).
What starts
| Command | Services |
|---|---|
docker compose up -d |
Postgres (descrybe-v2-postgres) with pg_isready healthcheck |
npm run setup |
Ensures .env, starts Compose Postgres, runs goose migrate |
npm install && npm run dev |
Host API (:28471) + web (:28472) + worker |
Host DSN (matches Compose publish):
postgres://descrybe:descrybe@localhost:5433/descrybe?sslmode=disable
GET /healthz = API liveness. GET /readyz needs the host worker (included in npm run dev).
Prerequisites
- Docker Desktop (Windows / macOS) or Docker Engine + Compose v2 (Linux)
- Node ≥ 20 and Go 1.25 on the host for
npm run setup/npm run dev
Windows (Docker Desktop)
- Install Docker Desktop; prefer the WSL2 backend (Settings → General).
- Start Docker (whale icon), then from the repo in PowerShell:
npm run setup
npm install
npm run dev
- If 5433 is busy: stop the other Postgres/Compose project or change only the host side of
ports:indocker-compose.yml("5433:5432"→"NEWport:5432") and updateDATABASE_URLin.env.
macOS (Docker Desktop)
- Install Docker Desktop (Apple Silicon or Intel build as needed).
- From Terminal:
npm run setup
npm install && npm run dev
Same ports and DSN as Windows. Home-directory clones are shared with Docker by default.
Linux (Docker Engine)
- Install Docker Engine and the Compose v2 plugin (
docker compose version). - Add your user to the
dockergroup (re-login) or usesudo. - From the repo:
npm run setup
npm install && npm run dev
Optional: bind Postgres to loopback only with "127.0.0.1:5433:5432" if you do not want LAN exposure.
Makefile
make up # docker compose up -d
make down # docker compose down
make setup # npm run setup equivalent
Troubleshooting
| Symptom | Fix |
|---|---|
Bind for 0.0.0.0:5433 failed |
Another Compose/Postgres; docker compose down elsewhere or change host port |
| Postgres never healthy | docker compose logs postgres; wait for pg_isready |
/readyz → 503 |
Start host worker (npm run dev includes it; or npm run dev:worker). Read JSON reason. Compose does not run the worker. |
| Windows: Docker not running | Start Docker Desktop before npm run setup |