|
|
@@ -137,7 +137,7 @@ class Start
|
|
|
system("sudo cp -f {$directory}/config/logrotate.conf /etc/logrotate.d/{$name}");
|
|
|
|
|
|
// 启动容器
|
|
|
- system("docker-compose -f {$directory}/config/docker.yml up -d");
|
|
|
+ system("docker-compose -p {$name} -f {$directory}/config/docker.yml up -d");
|
|
|
// 重载Nginx
|
|
|
system("docker exec nginx nginx -s reload");
|
|
|
$this->getConnection()->query('commit');
|
|
|
@@ -145,7 +145,7 @@ class Start
|
|
|
echo "exception:" . $e->__toString() . "\n";
|
|
|
$this->getConnection()->query('rollback');
|
|
|
if (file_exists($directory . '/config/docker.yml')) {
|
|
|
- system("docker-compose -f {$directory}/config/docker.yml rm -s -f");
|
|
|
+ system("docker-compose -p {$name} -f {$directory}/config/docker.yml rm -s -f");
|
|
|
}
|
|
|
$redis = $this->getRedis();
|
|
|
$lockKey = static::IP_LOCK_KEY . $ip;
|
|
|
@@ -177,7 +177,7 @@ class Start
|
|
|
'name' => $name,
|
|
|
]);
|
|
|
if (file_exists($directory . '/config/docker.yml')) {
|
|
|
- system("docker-compose -f {$directory}/config/docker.yml rm -s -f");
|
|
|
+ system("docker-compose -p {$name} -f {$directory}/config/docker.yml rm -s -f");
|
|
|
}
|
|
|
// 容器存储目录
|
|
|
$directory = $this->containersBasePath . $name;
|