fix port trim

This commit is contained in:
Bozhidar 2024-04-27 01:32:23 +03:00
parent b7298698bd
commit ac2de6c2f3
2 changed files with 4 additions and 1 deletions

View file

@ -57,6 +57,9 @@ class DockerContainer extends Model
$nextId = $getLastContainer->id + 1;
}
$model->port = trim($model->port);
$model->external_port = trim($model->external_port);
$dockerContainerApi = new DockerContainerApi();
$dockerContainerApi->setImage($model->image);
$dockerContainerApi->setEnvironmentVariables($model->environment_variables);

View file

@ -279,7 +279,7 @@ class Domain extends Model
$findDockerContainer = DockerContainer::where('id', $this->server_application_settings['docker_container_id'])
->first();
if ($findDockerContainer) {
$apacheVirtualHostBuilder->setProxyPass('http://127.0.0.1:'.$findDockerContainer->external_port);
$apacheVirtualHostBuilder->setProxyPass('http://127.0.0.1:'.$findDockerContainer->external_port.'/');
$apacheVirtualHostBuilder->setAppType('docker');
$apacheVirtualHostBuilder->setAppVersion($appVersion);
}