mirror of
https://github.com/Permissionless-Software-Foundation/psf-bch-api-base.git
synced 2026-09-21 16:52:00 -07:00
1.4 KiB
1.4 KiB
2026-04-02 Update Log
Summary
Docker deployments now run npm run docs at container start via an entrypoint script, and optionally apply APIDOC_URL from the environment so apiDoc HTML matches each deployment subdomain or public URL.
Changes Made
- Added
scripts/patch-apidoc-from-env.jsto setapidoc.jsonandpackage.jsonapidoc.urlfromAPIDOC_URL(dotenv loads the project.env, same path asbin/server.js). - Added
production/docker/entrypoint.shto run the patch script,npm run docs, thenexec npm start. - Updated
production/docker/Dockerfileto remove build-timenpm run docs, copy the entrypoint and patch script from the build context, and useENTRYPOINTfor the shell script. - Updated
production/docker/docker-compose.ymlto use buildcontext: ../..anddockerfile: production/docker/Dockerfileso COPY paths resolve from the repository root. - Compose mounts
./.envat/home/safeuser/psf-bch-api/.envso the app and entrypoint share one file (not/home/safeuser/.env). - Documented
APIDOC_URLin.env-example,production/docker/.env-example, andREADME.md(Production Docker section).
Outcome
- Operators can set
APIDOC_URLin the mounted.env(for examplehttps://api.example.com) per instance without rebuilding the image for each subdomain. - The HTML apiDoc bundle is regenerated on every container start so it stays aligned with the configured URL.