Certain variables are baked into the application at build time via Next.js and cannot be changed via environment variables in a pre-built Docker image. To use these, you must build your own image using --build-arg.
Default Locale
Use NEXT_PUBLIC_DEFAULT_LOCALE to set the fallback language. Supported locales include ar, ca, cs, da, de, en, es, fa, fr, he, hu, it, ja, ko, lv, nl, pl, pt, ro, ru, sk, tr, uk, zh.
Subpath / Reverse Proxy
To serve the webmail at a subpath (e.g., https://example.com/webmail), set NEXT_PUBLIC_BASE_PATH. You must also set NEXT_PUBLIC_LOCALE_PREFIX=always to avoid rewrite loops. Your reverse proxy should point to the container without stripping the prefix.
Example Build Command:
docker build --build-arg NEXT_PUBLIC_BASE_PATH=/webmail -t bulwark-webmail .
docker build --build-arg NEXT_PUBLIC_DEFAULT_LOCALE=de -t bulwark-webmail .
# For subpaths:
docker build --build-arg NEXT_PUBLIC_BASE_PATH=/webmail -t bulwark-webmail .