An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Revert "fix(docker): migrate database start actions from --time to -t flag"
Andras Bacsai9503da60b439
diff --git a/app/Actions/Database/StartClickhouse.php b/app/Actions/Database/StartClickhouse.phpindex 6da5465c6a..7fdfe9aeb3 100644--- a/app/Actions/Database/StartClickhouse.php+++ b/app/Actions/Database/StartClickhouse.php@@ -105,7 +105,7 @@ class StartClickhouse$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";$this->commands[] = "echo 'Pulling {$database->image} image.'";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";$this->commands[] = "echo 'Database started.'";diff --git a/app/Actions/Database/StartDragonfly.php b/app/Actions/Database/StartDragonfly.phpindex cd820523d7..d1bb119afc 100644--- a/app/Actions/Database/StartDragonfly.php+++ b/app/Actions/Database/StartDragonfly.php@@ -192,7 +192,7 @@ class StartDragonflyif ($this->database->enable_ssl) {$this->commands[] = "chown -R 999:999 $this->configuration_dir/ssl/server.key $this->configuration_dir/ssl/server.crt";}- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";$this->commands[] = "echo 'Database started.'";diff --git a/app/Actions/Database/StartKeydb.php b/app/Actions/Database/StartKeydb.phpindex 863691e1e0..128469e240 100644--- a/app/Actions/Database/StartKeydb.php+++ b/app/Actions/Database/StartKeydb.php@@ -208,7 +208,7 @@ class StartKeydbif ($this->database->enable_ssl) {$this->commands[] = "chown -R 999:999 $this->configuration_dir/ssl/server.key $this->configuration_dir/ssl/server.crt";}- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";$this->commands[] = "echo 'Database started.'";diff --git a/app/Actions/Database/StartMariadb.php b/app/Actions/Database/StartMariadb.phpindex 498ba0b0b3..29dd7b8feb 100644--- a/app/Actions/Database/StartMariadb.php+++ b/app/Actions/Database/StartMariadb.php@@ -209,7 +209,7 @@ class StartMariadb$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";$this->commands[] = "echo 'Pulling {$database->image} image.'";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";$this->commands[] = "echo 'Database started.'";diff --git a/app/Actions/Database/StartMongodb.php b/app/Actions/Database/StartMongodb.phpindex 9565990c1a..5982b68bec 100644--- a/app/Actions/Database/StartMongodb.php+++ b/app/Actions/Database/StartMongodb.php@@ -260,7 +260,7 @@ class StartMongodb$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";$this->commands[] = "echo 'Pulling {$database->image} image.'";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";if ($this->database->enable_ssl) {diff --git a/app/Actions/Database/StartMysql.php b/app/Actions/Database/StartMysql.phpindex 337516405c..c1df8d6db1 100644--- a/app/Actions/Database/StartMysql.php+++ b/app/Actions/Database/StartMysql.php@@ -210,7 +210,7 @@ class StartMysql$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";$this->commands[] = "echo 'Pulling {$database->image} image.'";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";diff --git a/app/Actions/Database/StartPostgresql.php b/app/Actions/Database/StartPostgresql.phpindex 41e39c811f..1ae0d56a05 100644--- a/app/Actions/Database/StartPostgresql.php+++ b/app/Actions/Database/StartPostgresql.php@@ -223,7 +223,7 @@ class StartPostgresql$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";$this->commands[] = "echo 'Pulling {$database->image} image.'";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";if ($this->database->enable_ssl) {diff --git a/app/Actions/Database/StartRedis.php b/app/Actions/Database/StartRedis.phpindex 2eaf82fdd7..4c99a0213b 100644--- a/app/Actions/Database/StartRedis.php+++ b/app/Actions/Database/StartRedis.php@@ -205,7 +205,7 @@ class StartRedisif ($this->database->enable_ssl) {$this->commands[] = "chown -R 999:999 $this->configuration_dir/ssl/server.key $this->configuration_dir/ssl/server.crt";}- $this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";+ $this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";$this->commands[] = "echo 'Database started.'";diff --git a/tests/Unit/StopProxyTest.php b/tests/Unit/StopProxyTest.phpindex f0c51a8962..62151e1d14 100644--- a/tests/Unit/StopProxyTest.php+++ b/tests/Unit/StopProxyTest.php@@ -7,7 +7,7 @@ it('ensures stop proxy includes wait loop for container removal', function () {// Simulate the command sequence from StopProxy$commands = [- 'docker stop -t 30 coolify-proxy 2>/dev/null || true',+ 'docker stop --time=30 coolify-proxy 2>/dev/null || true','docker rm -f coolify-proxy 2>/dev/null || true','# Wait for container to be fully removed','for i in {1..10}; do',@@ -21,7 +21,7 @@ it('ensures stop proxy includes wait loop for container removal', function () {$commandsString = implode("\n", $commands);// Verify the stop sequence includes all required components- expect($commandsString)->toContain('docker stop -t 30 coolify-proxy')+ expect($commandsString)->toContain('docker stop --time=30 coolify-proxy')->and($commandsString)->toContain('docker rm -f coolify-proxy')->and($commandsString)->toContain('for i in {1..10}; do')->and($commandsString)->toContain('if ! docker ps -a --format "{{.Names}}" | grep -q "^coolify-proxy$"')@@ -41,7 +41,7 @@ it('includes error suppression in stop proxy commands', function () {// Test that stop/remove commands suppress errors gracefully$commands = [- 'docker stop -t 30 coolify-proxy 2>/dev/null || true',+ 'docker stop --time=30 coolify-proxy 2>/dev/null || true','docker rm -f coolify-proxy 2>/dev/null || true',];@@ -54,9 +54,9 @@ it('uses configurable timeout for docker stop', function () {// Verify that stop command includes the timeout parameter$timeout = 30;- $stopCommand = "docker stop -t $timeout coolify-proxy 2>/dev/null || true";+ $stopCommand = "docker stop --time=$timeout coolify-proxy 2>/dev/null || true";- expect($stopCommand)->toContain('-t 30');+ expect($stopCommand)->toContain('--time=30');});it('waits for swarm service container removal correctly', function () {