Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
67 changed files
with
3,618 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,3 @@ | ||
package appports | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/drud/ddev/pkg/util" | ||
) | ||
|
||
// Define the DBA and MailHog ports as variables so that we can override them with ldflags if required. | ||
|
||
// DBAPort defines the default phpmyadmin port used on the router. | ||
var dbaPort = "8036" | ||
|
||
// mailHogPort defines the default mailhog exposed by the router. | ||
var mailhogPort = "8025" | ||
|
||
// dbPort defines the default DB (MySQL) port. | ||
var dbPort = "3306" | ||
|
||
// webPort defines the internal web port | ||
var webPort = "80" | ||
|
||
var ports = map[string]string{ | ||
"mailhog": mailhogPort, | ||
"dba": dbaPort, | ||
"db": dbPort, | ||
"web": webPort, | ||
} | ||
|
||
// GetPort returns the external router (as a string) for the given service. This can be used to find a given port for docker-compose manifests, | ||
// or for automated testing. | ||
func GetPort(service string) string { | ||
service = strings.ToLower(service) | ||
val, ok := ports[service] | ||
if !ok { | ||
util.Failed("Could not find port for service %s", service) | ||
} | ||
|
||
return val | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.