From 5a8b7d8c83f00f589d5caadd3249a80ad48d0a9b Mon Sep 17 00:00:00 2001 From: khj011219 Date: Sat, 31 Oct 2026 02:40:22 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EB=B0=B0=ED=8F=AC=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index ef49cb9..0a54c87 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -101,6 +101,23 @@ echo "Step 4: Removing old container ($OLD)..." docker compose -f docker-compose.yml stop $OLD || true docker compose -f docker-compose.yml rm -f $OLD || true +echo "Step 5: Cleaning up old application images..." + +PREVIOUS_IMAGE="" +if [ -f .last-deployed-tag ]; then + PREVIOUS_IMAGE=$(cat .last-deployed-tag) +fi + +APP_REPOSITORY="${APP_IMAGE%:*}" + +docker images "$APP_REPOSITORY" --format '{{.Repository}}:{{.Tag}}' | +while read -r IMAGE; do + if [ "$IMAGE" != "$APP_IMAGE" ] && + [ "$IMAGE" != "$PREVIOUS_IMAGE" ]; then + docker image rm "$IMAGE" || true + fi +done + docker image prune -f echo "$APP_IMAGE" > .last-deployed-tag From 2904221ded30d78c34b68ad86612ef0cbbd993de Mon Sep 17 00:00:00 2001 From: khj011219 Date: Sat, 31 Oct 2026 03:07:23 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=20=EB=A1=9C?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EC=85=98=20=EC=84=A4=EC=A0=95=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5a17168..c2b83a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,9 @@ +x-logging: &default-logging + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + services: nginx: image: nginx:stable-alpine @@ -15,6 +21,7 @@ services: image: ${APP_IMAGE} container_name: routee-app-blue restart: unless-stopped + logging: *default-logging expose: - "8080" environment: @@ -51,6 +58,7 @@ services: image: ${APP_IMAGE} container_name: routee-app-green restart: unless-stopped + logging: *default-logging expose: - "8080" environment: @@ -116,6 +124,7 @@ services: image: grafana/tempo:latest container_name: routee-tempo restart: unless-stopped + logging: *default-logging user: "0" command: [ "-config.file=/etc/tempo.yaml" ] volumes: