Application will not start
Symptoms
The API process exits during bootstrap, or Compose shows the API unhealthy.
Likely causes
.envmissing a required group. S3 settings, AI base URL, key, and model names, JWT secrets, database URL, Redis URL, andCREDENTIAL_VAULT_KEY_V1are required. See Environment.APP_ENV=productionwithoutSENTRY_DSN, or JWT secrets that match or are shorter than 32 characters.- A partial integration group. Setting
RAZORPAY_KEY_IDorSMTP_HOSTor an Amazon client id without the rest of that group fails validation. - Migrations have not been applied. Compose comments and the bootstrap runbook say the health check fails until
yarn migrate:deployhas run. - Node version.
enginessays>=24. The README says 20+. Unknown which one CI uses. The process may refuse to start under an engine check if Yarn enforces it.
How to investigate
- Read the Pino log from the process that exited.
main.tsbootstrap catch logs and callsprocess.exit(1). - Compare
.envto.env.exampleand toenvironment.validation.ts. - Confirm Postgres and Redis from Compose are up.
Useful commands
cd pnxt-api-nestjs
docker compose up -d
docker compose run --rm api yarn migrate:deploy
yarn start:api
Relevant logs
Bootstrap exception on stdout/stderr. Validation errors name the missing variable. Do not paste secret values into tickets.
Resolution
Set the missing configuration and migrate. Embedding and AI gateway downtime is not supposed to block boot. The embedding service catches those failures. A missing AI setting still fails validation. Those are different.
Unknown
Exact production Node version. Whether a particular host runs engine checks.