Skip to content

Commit

Permalink
Merge pull request #91 from dnd-side-project/main
Browse files Browse the repository at this point in the history
Synchronize develop Branch
  • Loading branch information
miraexhoi authored Aug 23, 2024
2 parents 486238e + 35d93a3 commit cb024f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/backend-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.APPLICATION_PROD }}" > ./src/main/resources/application-prod.yml
echo "cors:" >> ./src/main/resources/application-prod.yml
echo " allowed-origin: ${{ secrets.ALLOWED_ORIGIN }}" >> ./src/main/resources/application-prod.yml
echo " max-age: 2400" >> ./src/main/resources/application-prod.yml
- name: Set executable permission
run: chmod +x ./gradlew
Expand All @@ -38,12 +41,12 @@ jobs:
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_PROD }}
username: ec2-user
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }}
envs: GITHUB_SHA
script: |
sudo docker stop spaced
sudo docker rm spaced
sudo docker stop spaced || true
sudo docker rm spaced || true
sudo docker rmi ${{ secrets.DOCKER_USERNAME }}/spaced:0.0.1-SNAPSHOT
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/spaced:0.0.1-SNAPSHOT
sudo docker run -d -p 8080:8080 --name spaced ${{ secrets.DOCKER_USERNAME }}/spaced:0.0.1-SNAPSHOT \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:17
ARG JAR_FILE=build/libs/*.jar
ARG JAR_FILE=build/libs/spaced-0.0.1-SNAPSHOT.jar
COPY ${JAR_FILE} app.jar
ENV TZ=Asia/Seoul
ENTRYPOINT ["java","-jar","/app.jar","-Duser.timezone=Asia/Seoul"]
ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-Duser.timezone=Asia/Seoul", "-jar", "/app.jar"]

0 comments on commit cb024f4

Please sign in to comment.