From aeef3b63cbf0bafd720a915a6da58065e891cdef Mon Sep 17 00:00:00 2001 From: jisangs Date: Mon, 6 Jul 2026 22:25:34 +0900 Subject: [PATCH] =?UTF-8?q?Stage=20=EC=84=9C=EB=B2=84=EC=97=90=20deploy=20?= =?UTF-8?q?=ED=95=A0=20=EB=95=8C=20index.html=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=9D=84=20/var/www/html=20=ED=8F=B4=EB=8D=94=EC=97=90=20?= =?UTF-8?q?=EB=B3=B5=EC=82=AC=ED=95=98=EB=8A=94=20=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/stage/Dockerfile | 7 +++++++ deploy/stage/deploy-stage.sh | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/deploy/stage/Dockerfile b/deploy/stage/Dockerfile index 5d339a1..c45387b 100644 --- a/deploy/stage/Dockerfile +++ b/deploy/stage/Dockerfile @@ -19,3 +19,10 @@ RUN { \ ENV TZ=Asia/Seoul RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN printf '#!/bin/sh\ncp /var/www/html/mouse_typing/index.html /var/www/html/index.html\nexec "$@"\n' \ + > /usr/local/bin/entrypoint.sh \ + && chmod +x /usr/local/bin/entrypoint.sh + +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +CMD ["apache2-foreground"] diff --git a/deploy/stage/deploy-stage.sh b/deploy/stage/deploy-stage.sh index 42fb365..66599da 100644 --- a/deploy/stage/deploy-stage.sh +++ b/deploy/stage/deploy-stage.sh @@ -19,5 +19,9 @@ fi echo "=== [3/3] docker compose up ===" docker compose -f $BASE_DIR/docker-compose.yml up -d +if [ $? -ne 0 ]; then + echo "docker compose up 실패. 배포 중단." + exit 1 +fi echo "=== 배포 완료 ===" \ No newline at end of file