Pular para conteúdo

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

  1. Build the image while supplying the public API address as a Docker build argument.
  2. Confirm the image build succeeds.
  3. Inspect the generated web bundle for the old localhost API address; it must not be present.
  4. Start the image and complete sign-in or sign-up in a browser.
  5. Confirm the request host is the configured public API address.

Negative validation

  1. Attempt the production build without the public API address.
  2. Confirm the build stops with a message naming NEXT_PUBLIC_API_URL.

Dokploy validation

  1. Set NEXT_PUBLIC_API_URL=https://prontuare-api.inviosat.com in Build Time Arguments.
  2. Trigger a clean rebuild of the web application.
  3. Open the deployed sign-in or registration page.
  4. Confirm its API request targets prontuare-api.inviosat.com, then complete a real smoke flow.