New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin page not working when setting a PUBLIC_URL #308
Comments
Make sure to set those environment files during the build stage of your Dockerfile. |
You might also want to check https://forum.strapi.io/t/deployed-strapi-admin-panel-trying-to-hit-localhost-1337/7598 |
did you run the |
If the URL is defined at build time, then the output image is tied to that url and can not be reused to deploy to different environments like dev, qa, prod … A suggestion is that the public url for the admin ui must be set at runtime instead of build time, but I think this can be archived on the docker files not in strapi side |
Does anyone know whether this has been improved yet? |
When setting a PUBLIC_URL via server.js, the admin page opens correctly at https://example.com/strapi/dashboard
However, the javascript files in the HTML page cannot be loaded (cf. screenshot) as the PUBLIC_URL (PUBLIC_ADMIN_URL) seems not to be used.
/admin/runtime~main.d1293aad.js
should be
/strapi/dashboard/runtime~main.d1293aad.js
The text was updated successfully, but these errors were encountered: