Repository navigation
Docker
🇪🇸 Español
The Dockerfile has three targets. Images use Next.js standalone output, Node.js 24 and an unprivileged user. They build without credentials or database access.
| Target | Purpose |
|---|---|
runner |
Default target: the web application on port 4000. |
collector |
Imports the inventory from Blob Storage into PostgreSQL. |
migrator |
Pre-deployment job that applies database migrations. |
docker build -t cloud-inventory-web .
docker build --target collector -t cloud-inventory-collector .
docker build --target migrator -t cloud-inventory-migrator .
docker run --rm --env-file .env -v "$PWD/certs:/app/certs:ro" cloud-inventory-migrator
docker run --rm --env-file .env -v "$PWD/certs:/app/certs:ro" cloud-inventory-collector azure
docker run -d --name cloud-inventory -p 4000:4000 --env-file .env \
-v "$PWD/certs:/app/certs:ro" cloud-inventory-web-
.envis passed at runtime and never copied into images. - Mount a private CA in
/app/certsand setDB_SSL_CA_PATHwhen PostgreSQL uses one. - Use
host.docker.internalasDB_HOSTto reach a PostgreSQL running on the host. - Docker uses its own
node_modules, independent from your local install.
| Endpoint | Checks |
|---|---|
/api/health/ |
Liveness of the process. |
/api/ready/ |
Database and schema. |
compose.example.yaml shows the expected order: the migrator must complete successfully before the web and the collector start.
Run migrations as a separate job against the writer endpoint, with a DDL user (DB_MIGRATION_*), before sending traffic to the new version. The web process never executes DDL, and migrations never run automatically on every replica start. Then run db:check, start the new replicas and wait for /api/ready/ to return 200.
See the migration procedure in docs/backend.md.
Website / Web · Repository / Repositorio · Report a vulnerability / Comunicar una vulnerabilidad · MIT License / Licencia MIT