Skip to content

Commit

Permalink
chore: 스크립트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
coli-geonwoo committed Nov 27, 2024
1 parent 12a1e05 commit 8c92d12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/backend-cd-prod-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ env:
jobs:
build-and-push:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
# defaults:
# run:
# working-directory: backend
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -43,6 +43,15 @@ jobs:
with:
report_paths: ${{ github.workspace }}/backend/build/test-results/**/*.xml

- name: Send docker-compose.yml
uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.AWS_PROD_HOSTNAME }}
key: ${{ secrets.AWS_PROD_PRIVATE_KEY }}
source: "../../backend/docker-compose.yml"
target: "/home/ubuntu/"

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -53,7 +62,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Docker Image Build And Push
run: docker build --platform linux/arm64 -t ${{ secrets.DOCKERHUB_USERNAME }}/$DOCKERHUB_REPOSITORY:${{ github.sha }}-dev -f Dockerfile . --push
run: docker build --platform linux/arm64 -t ${{ secrets.DOCKERHUB_USERNAME }}/$DOCKERHUB_REPOSITORY:${{ github.sha }}-prod_v2 -f Dockerfile . --push

pull-and-deploy:
needs: build-and-push
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:17-jdk

ARG JAR_FILE=./build/libs/ody-backend-0.0.1-SNAPSHOT.jar

ENV SPRING_PROFILES_ACTIVE=dev
ENV SPRING_PROFILES_ACTIVE=prod
ENV JASYPT_ENCRYPTOR_PASSWORD=${JASYPT_ENCRYPTOR_PASSWORD}

COPY ${JAR_FILE} ody-backend.jar
Expand Down

0 comments on commit 8c92d12

Please sign in to comment.