Skip to content

Commit 751f8db

Browse files
authored
Revert "fix(docker): migrate database start actions from --time to -t flag" (#7389)
2 parents 2898448 + 9503da6 commit 751f8db

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

app/Actions/Database/StartClickhouse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function handle(StandaloneClickhouse $database)
105105
$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";
106106
$this->commands[] = "echo 'Pulling {$database->image} image.'";
107107
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";
108-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
108+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
109109
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
110110
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
111111
$this->commands[] = "echo 'Database started.'";

app/Actions/Database/StartDragonfly.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function handle(StandaloneDragonfly $database)
192192
if ($this->database->enable_ssl) {
193193
$this->commands[] = "chown -R 999:999 $this->configuration_dir/ssl/server.key $this->configuration_dir/ssl/server.crt";
194194
}
195-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
195+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
196196
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
197197
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
198198
$this->commands[] = "echo 'Database started.'";

app/Actions/Database/StartKeydb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function handle(StandaloneKeydb $database)
208208
if ($this->database->enable_ssl) {
209209
$this->commands[] = "chown -R 999:999 $this->configuration_dir/ssl/server.key $this->configuration_dir/ssl/server.crt";
210210
}
211-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
211+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
212212
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
213213
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
214214
$this->commands[] = "echo 'Database started.'";

app/Actions/Database/StartMariadb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function handle(StandaloneMariadb $database)
209209
$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";
210210
$this->commands[] = "echo 'Pulling {$database->image} image.'";
211211
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";
212-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
212+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
213213
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
214214
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
215215
$this->commands[] = "echo 'Database started.'";

app/Actions/Database/StartMongodb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public function handle(StandaloneMongodb $database)
260260
$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";
261261
$this->commands[] = "echo 'Pulling {$database->image} image.'";
262262
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";
263-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
263+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
264264
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
265265
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
266266
if ($this->database->enable_ssl) {

app/Actions/Database/StartMysql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function handle(StandaloneMysql $database)
210210
$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";
211211
$this->commands[] = "echo 'Pulling {$database->image} image.'";
212212
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";
213-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
213+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
214214
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
215215
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
216216

app/Actions/Database/StartPostgresql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function handle(StandalonePostgresql $database)
223223
$this->commands[] = "echo '{$readme}' > $this->configuration_dir/README.md";
224224
$this->commands[] = "echo 'Pulling {$database->image} image.'";
225225
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";
226-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
226+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
227227
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
228228
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
229229
if ($this->database->enable_ssl) {

app/Actions/Database/StartRedis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function handle(StandaloneRedis $database)
205205
if ($this->database->enable_ssl) {
206206
$this->commands[] = "chown -R 999:999 $this->configuration_dir/ssl/server.key $this->configuration_dir/ssl/server.crt";
207207
}
208-
$this->commands[] = "docker stop -t 10 $container_name 2>/dev/null || true";
208+
$this->commands[] = "docker stop --time=10 $container_name 2>/dev/null || true";
209209
$this->commands[] = "docker rm -f $container_name 2>/dev/null || true";
210210
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
211211
$this->commands[] = "echo 'Database started.'";

tests/Unit/StopProxyTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// Simulate the command sequence from StopProxy
99
$commands = [
10-
'docker stop -t 30 coolify-proxy 2>/dev/null || true',
10+
'docker stop --time=30 coolify-proxy 2>/dev/null || true',
1111
'docker rm -f coolify-proxy 2>/dev/null || true',
1212
'# Wait for container to be fully removed',
1313
'for i in {1..10}; do',
@@ -21,7 +21,7 @@
2121
$commandsString = implode("\n", $commands);
2222

2323
// Verify the stop sequence includes all required components
24-
expect($commandsString)->toContain('docker stop -t 30 coolify-proxy')
24+
expect($commandsString)->toContain('docker stop --time=30 coolify-proxy')
2525
->and($commandsString)->toContain('docker rm -f coolify-proxy')
2626
->and($commandsString)->toContain('for i in {1..10}; do')
2727
->and($commandsString)->toContain('if ! docker ps -a --format "{{.Names}}" | grep -q "^coolify-proxy$"')
@@ -41,7 +41,7 @@
4141
// Test that stop/remove commands suppress errors gracefully
4242

4343
$commands = [
44-
'docker stop -t 30 coolify-proxy 2>/dev/null || true',
44+
'docker stop --time=30 coolify-proxy 2>/dev/null || true',
4545
'docker rm -f coolify-proxy 2>/dev/null || true',
4646
];
4747

@@ -54,9 +54,9 @@
5454
// Verify that stop command includes the timeout parameter
5555

5656
$timeout = 30;
57-
$stopCommand = "docker stop -t $timeout coolify-proxy 2>/dev/null || true";
57+
$stopCommand = "docker stop --time=$timeout coolify-proxy 2>/dev/null || true";
5858

59-
expect($stopCommand)->toContain('-t 30');
59+
expect($stopCommand)->toContain('--time=30');
6060
});
6161

6262
it('waits for swarm service container removal correctly', function () {

0 commit comments

Comments
 (0)