8000 add php to the supported list by rberrelleza · Pull Request #596 · okteto/okteto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add php to the supported list #596

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

Merged
merged 1 commit into from
Dec 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
22 changes: 22 additions & 0 deletions pkg/linguist/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type languageDefault struct {
environment []model.EnvVar
volumes []model.Volume
forward []model.Forward
reverse []model.Reverse
securityContext *model.SecurityContext
}

Expand All @@ -27,6 +28,7 @@ const (
java = "java"
ruby = "ruby"
csharp = "csharp"
php = "php"

// Unrecognized is the option returned when the linguist couldn't detect a language
Unrecognized = "other"
Expand Down Expand Up @@ -144,6 +146,23 @@ func init() {
},
}

languageDefaults[php] = languageDefault{
image: "okteto/php:7",
command: []string{"bash"},
forward: []model.Forward{
{
Local: 8080,
Remote: 8080,
},
},
reverse: []model.Reverse{
{
Local: 9000,
Remote: 9000,
},
},
}

languageDefaults[Unrecognized] = languageDefault{
image: model.DefaultImage,
command: []string{"bash"},
Expand Down Expand Up @@ -176,6 +195,7 @@ func GetDevConfig(language string) *model.Dev {
Environment: vals.environment,
Volumes: vals.volumes,
Forward: vals.forward,
Reverse: vals.reverse,
SecurityContext: vals.securityContext,
}

Expand Down Expand Up @@ -209,6 +229,8 @@ func normalizeLanguage(language string) string {
return csharp
case "csharp":
return csharp
case "php":
return php
default:
return Unrecognized
}
Expand Down
0