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
7 changes: 7 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,12 @@ jib {
jvmFlags = ['-Xms512m']
format = 'OCI'
creationTime = 'USE_CURRENT_TIMESTAMP'
entrypoint = [
'sh',
'-c',
'apk --no-cache add tzdata && \
cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
java -cp /app/resources:/app/classes:/app/libs/* umc.codeplay.CodeplayApplication'
]
}
}
12 changes: 6 additions & 6 deletions docker/deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ docker image prune -f
echo "멈춘 container 삭제"
docker container prune -f

for i in {1..10}; do
for i in $(seq 1 10); do
if [ "$i" -eq 10 ]; then
echo "Health check failed"
docker compose down
exit 1
echo "Health check failed after maximum attempts"
docker compose down
exit 1
fi

if curl "http://localhost:8080/health"; then
if curl -s "http://localhost:8080/health" > /dev/null; then
echo "컨테이너가 정상적으로 실행되었습니다..."
break
fi

echo "spring boot application health check 중..."
echo "spring boot application health check 중... (attempt $i/10)"
sleep 15
done

Expand Down
3 changes: 2 additions & 1 deletion docker/deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ services:
- umc_code_play
restart: always
depends_on:
- database
database:
condition: service_healthy

networks:
umc_code_play:
Expand Down
Loading