So the issue isn’t the Dockerfile or NODE_ENV — it’s that your Entra/Microsoft auth provider config only exists in app-config.yaml but NOT in app-config.production.yaml.
When Backstage runs in Docker, it always loads the production config and the frontend requests:
/api/app-config?env=production
Since app-config.production.yaml doesn’t contain the Entra provider, Backstage returns “no configuration available,” which is why the Microsoft login popup fails.
When you manually change the URL to env=development, it works because that endpoint loads app-config.yaml, where the provider is actually defined.
You don’t need to change NODE_ENV — that part is correct.
Fix options:
- Move/copy the Entra provider config into
app-config.production.yaml, or
- Consolidate everything into
app-config.yaml and simply stop passing the extra production config file to the container.
If everything is in app-config.yaml, the backend will automatically use it for production without needing a separate app-config.production.yaml at all.