Skip to content
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

Change mailpit URL exposed in Dev UI? #79

Closed
edeandrea opened this issue Jul 29, 2024 · 15 comments · Fixed by #84
Closed

Change mailpit URL exposed in Dev UI? #79

edeandrea opened this issue Jul 29, 2024 · 15 comments · Fixed by #84
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@edeandrea
Copy link
Contributor

I notice in the Dev UI that when clicking the Mailpit UI link the URL brings you to a 127.0.0.1 URL.

Is it possible to change the host name in the URL? In cloud-based IDEs (like Eclipse Che, Gitpod, etc), the URL in the browser can't be 127.0.0.1/localhost. It needs to be a URL where the port can be mapped to the URL of the workspace.

@melloware
Copy link
Contributor

@ggrebert do you know if the above request is a limitation of TestContainers or Quarkus?

@ggrebert
Copy link
Contributor

It's not a TestContainer limitation.
TestContainer forward the MailPit port (8025) to dynamic one.
The real problem is the hostname. We need to change localhost to the real hostname.
I need to check to an existing working extension on Eclipse Che to check how is it done.

@gsmet
Copy link
Member

gsmet commented Jul 29, 2024

Could it be something similar to quarkusio/quarkus#42065 ?

(I haven’t looked at the issue, just connecting the dots on my phone…)

@melloware melloware added the enhancement New feature or request label Jul 29, 2024
@melloware
Copy link
Contributor

@gsmet that does look like its the solution!

@melloware melloware added this to the 1.2.0 milestone Jul 29, 2024
@ggrebert
Copy link
Contributor

The shared network is used for the communications between containers.
I have fixed this issue by adding a proxy which allow the access to the Mailpit UI on the same port of Quarkus.

@edeandrea
Copy link
Contributor Author

Nice! Would this change make #82 irrelevant? Or do you think having a way to configure a fixed port mapping is still a relevant use case?

@melloware
Copy link
Contributor

@edeandrea honestly i never know someone's use case so having it configurable is fine with me. I am sure someone else will ask for it down the road because they have 8025 in use by some other app or something!

@ggrebert
Copy link
Contributor

Agree.
It is always better to use the dynamic port created by TestContainer to be agnostic of the dev local configuration.
But we cannot known the needs of everyone.
So we can keep it and just encourage the proxy usage.

@ggrebert
Copy link
Contributor

With this 'proxy approach', we can envisage more quarkiverse extensions like phpMyAdmin, mongoDb Compass, RabbitMQ UI, etc...

@melloware
Copy link
Contributor

I made a few minor fixes: #85

@melloware
Copy link
Contributor

1.2.0 is in Maven Central @edeandrea if you want to give it a spin?

@edeandrea
Copy link
Contributor Author

1.2.0 is in Maven Central @edeandrea if you want to give it a spin?

I'll give it a spin in a little bit! Just sitting down to start my day!

@edeandrea
Copy link
Contributor Author

Works like a charm! Didn't even need to use the fixed port feature! The link from the dev ui works fine, plus by adding it to the che devfile's endpoints I can access it directly from eclipse che...

image

@melloware
Copy link
Contributor

Excellent!!!

@edeandrea
Copy link
Contributor Author

Thank you both for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants