Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions backend/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
# FastAPI - Blue (ํฌํŠธ 8000)
fastapi-blue:
Expand Down Expand Up @@ -48,4 +46,5 @@ services:

networks:
app-network:
driver: bridge
external: true
name: fastapi-shared-network
5 changes: 4 additions & 1 deletion backend/scripts/blue-green-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ health_check() {

# Nginx ์‹œ์ž‘ ํ•จ์ˆ˜
start_nginx_if_needed() {
# ๊ณต์œ  ๋„คํŠธ์›Œํฌ ์ƒ์„ฑ (์ด๋ฏธ ์žˆ์œผ๋ฉด ๋ฌด์‹œ๋จ)
docker network create fastapi-shared-network 2>/dev/null || true

if ! docker ps | grep -q "nginx"; then
echo "๐ŸŒ Nginx ๋กœ๋“œ ๋ฐธ๋Ÿฐ์„œ ์‹œ์ž‘..."
# nginx๋งŒ ๋‹จ๋…์œผ๋กœ ์‹œ์ž‘
Expand Down Expand Up @@ -128,7 +131,7 @@ if [ -n "$EXIST_AFTER" ]; then
# ์ด์ „ ํ™˜๊ฒฝ์ด ์žˆ๋‹ค๋ฉด ๋‹ค์‹œ ์‹œ์ž‘
if [ "$BEFORE_COMPOSE_COLOR" != "none" ]; then
echo "๐Ÿ”„ ์ด์ „ $BEFORE_COMPOSE_COLOR ํ™˜๊ฒฝ์„ ๋ณต๊ตฌํ•ฉ๋‹ˆ๋‹ค..."
docker-compose -p ${DOCKER_APP_NAME}-${BEFORE_COMPOSE_COLOR} -f docker-compose.yml up -d
docker-compose -p ${DOCKER_APP_NAME}-${BEFORE_COMPOSE_COLOR} -f docker-compose.yml up -d fastapi-${BEFORE_COMPOSE_COLOR}
fi

echo "โŒ ๋ฐฐํฌ ์‹คํŒจ! ๋กค๋ฐฑ ์™„๋ฃŒ."
Expand Down
Loading