Skip to content

Commit

Permalink
release : dev-prod 운영환경 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjooon2 committed Aug 17, 2023
1 parent 95f0b55 commit 044ba48
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
8 changes: 4 additions & 4 deletions backend/deploy-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PROJECT_NAME=zipgo-backend

echo '> development 서버를 실행합니다'
echo '> 현재 구동중인 애플리케이션 PID 확인'
CURRENT_PID=$(sudo netstat -lntp | grep 8081 | awk '{print $7}' | cut -d'/' -f1)
CURRENT_PID=$(sudo netstat -lntp | grep 8080 | awk '{print $7}' | cut -d'/' -f1)

echo "현재 구동중인 애플리케이션 PID: $CURRENT_PID"

Expand All @@ -21,8 +21,8 @@ else
fi
fi

sudo chmod +x ~/develop/zipgo-backend-0.0.1-SNAPSHOT.jar
sudo chmod +x ~/zipgo-backend-0.0.1-SNAPSHOT.jar
sudo nohup java -jar \
-Dspring.profiles.active=dev \
-Dspring.config.import=file:/home/ubuntu/develop/env.properties \
~/develop/zipgo-backend-0.0.1-SNAPSHOT.jar > ~/develop/application.log 2>&1 &
-Dspring.config.import=file:/home/ubuntu/env.properties \
~/zipgo-backend-0.0.1-SNAPSHOT.jar > ~/application.log 2>&1 &
6 changes: 3 additions & 3 deletions backend/deploy-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ else
fi
fi

sudo chmod +x ~/production/zipgo-backend-0.0.1-SNAPSHOT.jar
sudo chmod +x ~/zipgo-backend-0.0.1-SNAPSHOT.jar
sudo nohup java -jar \
-Dspring.profiles.active=prod \
-Dspring.config.import=file:/home/ubuntu/production/env.properties \
~/production/zipgo-backend-0.0.1-SNAPSHOT.jar > ~/production/application.log 2>&1 &
-Dspring.config.import=file:/home/ubuntu/env.properties \
~/zipgo-backend-0.0.1-SNAPSHOT.jar > ~/application.log 2>&1 &
4 changes: 0 additions & 4 deletions backend/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
# port
server:
port: 8081

---
# database
Expand Down
6 changes: 0 additions & 6 deletions backend/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
# port
server:
port: 8080

---
# database
Expand Down Expand Up @@ -58,5 +54,3 @@ cloud:
zipgo-directory-name: ${ZIPGO_DIRECTORY_NAME}
pet-image-directory: ${PET_IMAGE_DIRECTORY}
image-url: ${DEV_SERVER_IMAGE_URL}
region:
static: ap-northeast-2

0 comments on commit 044ba48

Please sign in to comment.