Skip to content

Docker image never receives NEXT_PUBLIC_* values, so compose environment: has no effect #31

Open

Description

@EmmanuelOchaje

NEXT_PUBLIC_ variables are inlined into the client bundle at next build time. The Dockerfile runs npm run build with no ARG/ENV for them, and docker-compose.yml only sets them under environment: (runtime), which Next ignores for client code. The container therefore always ships with the fallbacks (http://localhost:3000, testnet passphrase), whatever compose says.

Suggested fix: Declare ARG NEXT_PUBLIC_API_URL, NEXT_PUBLIC_STELLAR_NETWORK, NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE, NEXT_PUBLIC_APP_URL in the build stage (exporting them as ENV), and pass them via build.args in compose. Document the build-time nature in docs/DEPLOYMENT.md.

Activity

  1. added
    bug
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions