Files
photoreport/apps/site/.env.example
spark 68c99dac2a
ci / typescript (push) Failing after 6m48s
ci / rust (push) Successful in 6m55s
fix(infra): source apps/site/.env before pm2 starts the site
site.config.cjs defaults API_URL to 127.0.0.1:3000, which is wrong whenever
pr-site runs on a different container than pr-api (every multi-container
deployment). pm2 reads process.env at invocation time, not apps/site/.env
(thats Nexts own, separate loading), so source it in deploy.sh before
startOrReload, same pattern as the prisma CLI fix. Adds .env.example to
document the var.

Paperclip-Issue: BIT-31073
Paperclip-Run: f8f86a1f-44b2-4845-8a61-e33b080c4699
2026-10-12 14:24:24 +01:00

5 lines
306 B
Bash

# Where this container's site process reaches the API. Point it at pr-api's internal
# address (or the public HTTPS URL) — never at 127.0.0.1, since site and api are separate
# containers. Read by infra/deploy/deploy.sh before `pm2 startOrReload infra/pm2/site.config.cjs`.
API_URL=http://127.0.0.1:3000