We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d805a83 commit bc46a83Copy full SHA for bc46a83
1 file changed
scripts/deploy.sh
@@ -4,6 +4,11 @@ set -e # 에러 발생 시 스크립트 중단
4
5
REPOSITORY=/home/ubuntu/app
6
LOG_FILE=$REPOSITORY/deploy.log
7
+
8
+# 환경 변수 로드
9
+log "> 환경 변수 로드"
10
+source ~/.bashrc
11
12
SPRING_PROFILE=${SPRING_PROFILE:-prod}
13
PORT=${PORT:-8080}
14
@@ -14,10 +19,6 @@ log() {
19
15
20
log "=== 배포 시작 ==="
16
21
17
-# 환경 변수 로드
18
-log "> 환경 변수 로드"
-source ~/.bashrc
-
22
log "> PROFILE=$SPRING_PROFILE / PORT=$PORT"
23
24
# 현재 구동 중인 애플리케이션 pid 확인
@@ -53,7 +54,7 @@ chmod +x $JAR_NAME
53
54
# 애플리케이션 실행
55
log "> $JAR_NAME 실행 (spring.profiles.active=$SPRING_PROFILE)"
56
nohup java -jar \
- -Dspring.profiles.active=prod \
57
+ -Dspring.profiles.active=$SPRING_PROFILE \
58
-Duser.timezone=Asia/Seoul \
59
-Xms512m \
60
-Xmx1024m \
0 commit comments