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
6 changes: 1 addition & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ jobs:
- name: ⚙️ Create application.yml
run: |
mkdir -p src/main/resources
cat <<EOF > src/main/resources/application.yml
spring:
profiles:
active: \${PROFILES_ACTIVE}
EOF
cat src/main/resources/application-prod.yml

- name: 🛠 Grant gradle permission
run: chmod +x gradlew
Expand Down
10 changes: 0 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,9 @@ services:
restart: always
ports:
- "8080:8080"
env_file:
- .env
environment:
PROFILES_ACTIVE: ${PROFILES_ACTIVE}

DB_URL: ${DB_URL}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}

JAVA_OPTS: >
-Xms256m
-Xmx512m
-Dfile.encoding=UTF-8

command: >
java $JAVA_OPTS -jar /app/app.jar
17 changes: 0 additions & 17 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,8 @@ echo "🚀 Daepiro prod deploy start"

cd /home/ubuntu

# 1️⃣ 운영 환경 고정
export PROFILES_ACTIVE=prod

# 2️⃣ .env 로드 (DB, Docker 정보 등)
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
fi

# 3️⃣ 최신 이미지 pull
docker-compose pull

# 4️⃣ 기존 컨테이너 종료
docker-compose down

# 5️⃣ 컨테이너 재기동
docker-compose up -d

# 6️⃣ 헬스 체크 (EC2 내부)
sleep 10
curl -f http://localhost:8080/actuator/health

echo "✅ Prod deploy success"