Skip to content

feat: add NEXT_PUBLIC_LOCALE_PREFIX build argument to Dockerfile#574

Open
HardAndHeavy wants to merge 1 commit into
bulwarkmail:mainfrom
HardAndHeavy:fix/dockerfile-locale-prefix-build-arg
Open

feat: add NEXT_PUBLIC_LOCALE_PREFIX build argument to Dockerfile#574
HardAndHeavy wants to merge 1 commit into
bulwarkmail:mainfrom
HardAndHeavy:fix/dockerfile-locale-prefix-build-arg

Conversation

@HardAndHeavy

Copy link
Copy Markdown

Summary

This PR adds the missing NEXT_PUBLIC_LOCALE_PREFIX build argument to the Dockerfile. Currently, building the image with --build-arg NEXT_PUBLIC_LOCALE_PREFIX=always (as suggested in the README for subpath deployments) fails because the argument is not declared and passed to the environment. This change aligns the Docker build process with the documented workflow.

Changes

  • Added ARG NEXT_PUBLIC_LOCALE_PREFIX= to the builder stage in the Dockerfile.
  • Added ENV NEXT_PUBLIC_LOCALE_PREFIX=$NEXT_PUBLIC_LOCALE_PREFIX after the BASE_PATH environment variable to ensure it's available during the Next.js build.
  • Added a descriptive comment to clarify the purpose of this variable.

Related Issues

Related to the documented deployment instructions for subpaths. Fixes the build error when using the --build-arg flag as described in the README.

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / code quality improvement
  • Chore / dependency update / CI change

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style and conventions
  • I have run npm run typecheck && npm run lint and there are no errors
  • The build passes (npm run build)
  • I have tested my changes locally
  • I have added or updated documentation if needed (N/A — aligns with existing README)
  • I have updated translations (locales/) if my changes affect user-facing text (N/A)
  • I have included screenshots or a screen recording for UI changes (N/A — build only)

Screenshots / Demo

N/A — build configuration change only.

Notes for Reviewers

This is a minimal change that simply declares the ARG and ENV, mirroring how NEXT_PUBLIC_BASE_PATH is already handled in the same Dockerfile. It does not change the default build behavior (since the variable defaults to empty).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant