GetMailpitHTTPPort returns app's mailpit router http port If HTTP_EXPOSE has a mapping to port 8025 in the container, use that If not, use the global or project MailpitHTTPPort
()
| 793 | // If HTTP_EXPOSE has a mapping to port 8025 in the container, use that |
| 794 | // If not, use the global or project MailpitHTTPPort |
| 795 | func (app *DdevApp) GetMailpitHTTPPort() string { |
| 796 | if httpExpose := app.GetWebEnvVar("HTTP_EXPOSE"); httpExpose != "" { |
| 797 | httpPort := app.TargetPortFromExposeVariable(httpExpose, "8025") |
| 798 | if httpPort != "" { |
| 799 | return httpPort |
| 800 | } |
| 801 | } |
| 802 | |
| 803 | port := globalconfig.DdevGlobalConfig.RouterMailpitHTTPPort |
| 804 | if port == "" { |
| 805 | port = nodeps.DdevDefaultMailpitHTTPPort |
| 806 | } |
| 807 | if app.MailpitHTTPPort != "" { |
| 808 | port = app.MailpitHTTPPort |
| 809 | } |
| 810 | return port |
| 811 | } |
| 812 | |
| 813 | // GetMailpitHTTPSPort returns app's mailpit router https port |
| 814 | // If HTTPS_EXPOSE has a mapping to port 8025 in the container, use that |