diff --git a/src/Service/Http/HttpApacheDockerService.php b/src/Service/Http/HttpApacheDockerService.php index 01a7d6e0ccd132dfba26b1e728bf9dfea6111e4d..4a050f4c2b26bde694c2f438688bd24a37e6ea95 100644 --- a/src/Service/Http/HttpApacheDockerService.php +++ b/src/Service/Http/HttpApacheDockerService.php @@ -28,6 +28,8 @@ class HttpApacheDockerService extends HttpApacheService implements DockerService const SERVICE_TYPE = 'apacheDocker'; const SERVICE_TYPE_NAME = 'Apache on Docker'; + const DOCKER_COMPOSE_UP_COMMAND = 'docker-compose up -d --build --force-recreate'; + /** * @var string The name of this server's container. @@ -228,10 +230,11 @@ YML; }); // Run docker-compose up -d --build + $command = self::DOCKER_COMPOSE_UP_COMMAND; $tasks['docker.compose.up'] = Provision::newTask() - ->start("Running docker-compose up -d --build in {$this->provider->server_config_path} ...") + ->start("Running {$command} in {$this->provider->server_config_path} ...") ->execute(function() { - return $this->provider->shell_exec('docker-compose up -d --build', NULL, 'exit'); + return $this->provider->shell_exec(self::DOCKER_COMPOSE_UP_COMMAND, NULL, 'exit'); }) ; // Run docker-compose up -d --build