Validation Guide: Public API Build Configuration
Prerequisites
- Docker is running.
- The web repository has the pnpm lockfile.
- The intended production API address is known.
Local image validation
- Build the image while supplying the public API address as a Docker build argument.
- Confirm the image build succeeds.
- Inspect the generated web bundle for the old localhost API address; it must not be present.
- Start the image and complete sign-in or sign-up in a browser.
- Confirm the request host is the configured public API address.
Negative validation
- Attempt the production build without the public API address.
- Confirm the build stops with a message naming
NEXT_PUBLIC_API_URL.
Dokploy validation
- Set
NEXT_PUBLIC_API_URL=https://prontuare-api.inviosat.com in Build Time Arguments.
- Trigger a clean rebuild of the web application.
- Open the deployed sign-in or registration page.
- Confirm its API request targets
prontuare-api.inviosat.com, then complete a real smoke flow.