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
Exposing/Running directus on a port other than 8055 prevents the admin app from loading #6858
Comments
Running directus on port 8080 via .env will surface the same issue. |
Make sure to set the PUBLIC_URL environment variable correctly 👍🏻 |
@rijkvanzanten , what is the reasoning here? The problem: If I want a proxy in my stack, I'll deploy one. The app should not be a proxy in itself. |
This isn't about proxying. The issue is static asset retrieval in a SPA context. People run Directus in all sorts of contexts, paths, and subfolders. The only way the app can accurately do routing and asset retrieval is by having the correct path to the base URL. Secondly, as per the docs, Directus uses this public url for things like password-reset links in emails, oAuth redirect paths, public logo retrieval etc etc. |
I can see your reasoning as we may need something like it in prod envs. However in doing so, basic container functionality is broken. Maybe it would be an option to get the pre rc-84 behaviour back simple boolean env; or by setting In our dev setup, we do not need advanced stuff like email and oAuth or accessing assets other then local.The current design, requiring PUBLIC_URL to be set, makes it nearly impossible to write a compose file for our developers as I do not have fancy rendering functions here. My only option is to drop this feature - forcing people to a single running directus container. |
the only thing that changed is that the docker image now uses whatever default value is set in directus itself. you can still set it to |
Thanks @rijkvanzanten , this works great for me |
Sweet! I've also opened a PR to set the actual default value of PUBLIC_URL to |
Describe the Bug
Exposing/Running directus on a port other than 8055 prevents the admin app from loading. Broken since rc.84.
To Reproduce
try to access
localhost:8080
from compose.yaml:What version of Directus are you using?
9.0.0.rc.85
What version of Node.js are you using?
official docker image
What database are you using?
official docker image
What browser are you using?
Chrome
What operating system are you using?
Windows
How are you deploying Directus?
docker compose
The text was updated successfully, but these errors were encountered: