From 77defffc4762df80c0dabddad0c025055c21c00b Mon Sep 17 00:00:00 2001 From: oskar Date: Thu, 16 Jul 2026 15:05:19 +0200 Subject: [PATCH] =?UTF-8?q?fix(deploy-node):=20warunkowy=20--build=20gdy?= =?UTF-8?q?=20serwis=20ma=20Dockerfile=20=E2=80=94=20kod=20nie=20wchodzi?= =?UTF-8?q?=C5=82=20bez=20rebuildu=20(c858dbc)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy/deploy-node.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/deploy/deploy-node.sh b/scripts/deploy/deploy-node.sh index 69df10c..c76e143 100755 --- a/scripts/deploy/deploy-node.sh +++ b/scripts/deploy/deploy-node.sh @@ -120,7 +120,18 @@ for service in "${SERVICES[@]}"; do COMPOSE_CMD="${COMPOSE_CMD} --env-file ${ENV_FILE}" fi - $COMPOSE_CMD up -d --remove-orphans + # Services with their own Dockerfile need a rebuild on every deploy — + # otherwise `up -d` sees "container running, image tag unchanged" and skips + # rebuilding even when src/ changed, silently leaving the old code running + # (backlog c858dbc). Services with a prebuilt image (no Dockerfile) don't + # need --build. + if [ -f "${REPO_PATH}/services/${service}/Dockerfile" ]; then + echo "Building ${service} (has Dockerfile)" + $COMPOSE_CMD up -d --build --remove-orphans + else + echo "Using prebuilt image for ${service}" + $COMPOSE_CMD up -d --remove-orphans + fi done echo "--- Deployment Complete ---"