fix: do not use port exposes on docker compose buildpacks
This commit is contained in:
parent
e3c7c615c6
commit
3c98b558f6
1 changed files with 10 additions and 5 deletions
|
|
@ -871,8 +871,10 @@ private function save_environment_variables()
|
|||
$envs->push($env->key.'='.$real_value);
|
||||
}
|
||||
// Add PORT if not exists, use the first port as default
|
||||
if ($this->application->environment_variables_preview->where('key', 'PORT')->isEmpty()) {
|
||||
$envs->push("PORT={$ports[0]}");
|
||||
if ($this->build_pack !== 'dockercompose') {
|
||||
if ($this->application->environment_variables_preview->where('key', 'PORT')->isEmpty()) {
|
||||
$envs->push("PORT={$ports[0]}");
|
||||
}
|
||||
}
|
||||
// Add HOST if not exists
|
||||
if ($this->application->environment_variables_preview->where('key', 'HOST')->isEmpty()) {
|
||||
|
|
@ -915,15 +917,17 @@ private function save_environment_variables()
|
|||
$envs->push($env->key.'='.$real_value);
|
||||
}
|
||||
// Add PORT if not exists, use the first port as default
|
||||
if ($this->application->environment_variables->where('key', 'PORT')->isEmpty()) {
|
||||
$envs->push("PORT={$ports[0]}");
|
||||
if ($this->build_pack !== 'dockercompose') {
|
||||
if ($this->application->environment_variables->where('key', 'PORT')->isEmpty()) {
|
||||
$envs->push("PORT={$ports[0]}");
|
||||
}
|
||||
}
|
||||
// Add HOST if not exists
|
||||
if ($this->application->environment_variables->where('key', 'HOST')->isEmpty()) {
|
||||
$envs->push('HOST=0.0.0.0');
|
||||
}
|
||||
}
|
||||
|
||||
ray($envs);
|
||||
if ($envs->isEmpty()) {
|
||||
$this->env_filename = null;
|
||||
if ($this->use_build_server) {
|
||||
|
|
@ -1514,6 +1518,7 @@ private function generate_compose_file()
|
|||
{
|
||||
$this->create_workdir();
|
||||
$ports = $this->application->main_port();
|
||||
ray('generate_compose_file: ', $ports);
|
||||
$onlyPort = null;
|
||||
if (count($ports) > 0) {
|
||||
$onlyPort = $ports[0];
|
||||
|
|
|
|||
Loading…
Reference in a new issue