-
Notifications
You must be signed in to change notification settings - Fork 30
Configurable Ports for Dashboard and Mailhog #967
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
Comments
Hi, this is already possible via the http flag. |
I tried the following and didn't see a way to get to the dashboard and mailhog. nhost up \
--disable-tls \
--hasura-port 8080 \
--hasura-console-port 8081 \
--auth-port 8082 \
--storage-port 8083 \
--functions-port 8084 \
--postgres-port 8085 |
Also adding |
I updated my original post description to better describe the changes of the code. |
sorry, I am still unsure what problem this is solving.
This is not accurate, you can use
The flag
Notes: You will need to just passthrough TLS as that's handled by the nhost cli and you may need to protect in your proxy the dashboard and mailhog as those have public access without authentication. |
The thing is you shouldn't need to do that. What you should do is the following:
And that's it, going to
Let me know if it works and if it doesn't why so we can look into this. If we can't make it work we can merge the PR but I would like to figure this out first because we keep adding more and more flags for edge cases and that only makes the cli more difficult to use. If you are in a hurry we can build a temporary cli with your patch so you can use it in the meantime. |
Uh oh!
There was an error while loading. Please reload this page.
Description
feat: configurable ports for Dashboard and Mailhog services
Problem
The Nhost CLI supports custom ports for most services such as Hasura, Auth, and Postgres, but the ports for the Dashboard and Mailhog services are currently hardcoded. This limits the ability of developers to avoid port conflicts or customize their local environment, particularly when running multiple Nhost instances simultaneously.
Solution
This PR adds two new CLI flags and associated support throughout the codebase to allow customization of Dashboard and Mailhog ports:
--dashboard-port
with env fallbackNHOST_DASHBOARD_PORT
--mailhog-port
with env fallbackNHOST_MAILHOG_PORT
Key implementation updates:
UintFlag
definitions for both ports incmd/dev/up.go
.ExposePorts
struct to includeDashboard
andMailhog
fields.dashboard
,mailhog
) to accept the new ports and apply them using theports()
utility.getServices()
to pass the port values correctly to each respective service.printInfo()
remains consistent and informative with the correct URLs displayed (though it still prints the base HTTP port for Dashboard and Mailhog to preserve the current behavior; further enhancements to output format could be addressed in a future PR).Notes
Example Usage:
The text was updated successfully, but these errors were encountered: