From ccfc0fb8ed241a7223289730034de34fa7e0717a Mon Sep 17 00:00:00 2001 From: Breno Salles Date: Sat, 28 Sep 2024 00:07:08 +0100 Subject: [PATCH] fix: Correct coolify stop/start behaviour --- roles/coolify/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/coolify/tasks/main.yml b/roles/coolify/tasks/main.yml index f7213a1..437c376 100644 --- a/roles/coolify/tasks/main.yml +++ b/roles/coolify/tasks/main.yml @@ -13,11 +13,11 @@ name: "Stop coolify containers every day at 4:40 AM" minute: "40" hour: "4" - job: "docker stop $(docker container ls -q -f 'name=coolify*')" + job: "docker compose -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml down" - name: Start coolify containers every day at 5:00 AM cron: name: "Start coolify containers every day at 5:00 AM" minute: "0" hour: "5" - job: "docker start $(docker ps -q -f 'status=exited')" + job: "docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --pull always --remove-orphans --force-recreate"