From 92d0cefddf5998aaa2967ee3c30920b2290b1829 Mon Sep 17 00:00:00 2001 From: Hayyan Hajwani <129366924+Hayyan612@users.noreply.github.com> Date: Thu, 17 Sep 2026 00:46:50 +0530 Subject: [PATCH 1/2] fix: target the dokploy container in the auth secret migration script docker ps --filter name=dokploy is a substring match, so it also matched dokploy-postgres and dokploy-traefik. docker ps lists the newest container first, so after a restart the 2FA migration could run in the wrong container and fail with "can't cd to /app". Select the task by its Swarm service-name label instead, which is compared exactly. --- apps/website/public/security/0.29.3.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/website/public/security/0.29.3.sh b/apps/website/public/security/0.29.3.sh index a187d48d..56e88685 100644 --- a/apps/website/public/security/0.29.3.sh +++ b/apps/website/public/security/0.29.3.sh @@ -50,7 +50,12 @@ else # Run 2FA migration inside the Dokploy container echo "🔄 Migrating existing 2FA records..." - DOKPLOY_CONTAINER=$(docker ps --filter "name=dokploy" --format "{{.ID}}" | head -n1) + # Select the dokploy service's task by its Swarm label: a name filter is a + # substring match that also hits dokploy-postgres and dokploy-traefik + DOKPLOY_CONTAINER=$(docker ps \ + --filter "label=com.docker.swarm.service.name=dokploy" \ + --format "{{.ID}}" \ + | head -n1) if [ -n "$DOKPLOY_CONTAINER" ]; then # v0.29.3/v0.29.4 images finish the migration but never exit when From 4bda0584bd7e12be95a6ca5fd2749124ead47afe Mon Sep 17 00:00:00 2001 From: Yash Kumar Date: Mon, 26 Oct 2026 08:40:58 +0530 Subject: [PATCH 2/2] Clarify Docker Swarm label matching in script Updated comments for clarity on Docker Swarm label matching. --- apps/website/public/security/0.29.3.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/website/public/security/0.29.3.sh b/apps/website/public/security/0.29.3.sh index 56e88685..d2a9b9c0 100644 --- a/apps/website/public/security/0.29.3.sh +++ b/apps/website/public/security/0.29.3.sh @@ -50,8 +50,7 @@ else # Run 2FA migration inside the Dokploy container echo "🔄 Migrating existing 2FA records..." - # Select the dokploy service's task by its Swarm label: a name filter is a - # substring match that also hits dokploy-postgres and dokploy-traefik + # Match by Swarm label: name=dokploy also matches dokploy-postgres and dokploy-traefik DOKPLOY_CONTAINER=$(docker ps \ --filter "label=com.docker.swarm.service.name=dokploy" \ --format "{{.ID}}" \