Skip to content

Commit

Permalink
chore: logback for aws key setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy.lee committed Oct 18, 2023
1 parent 6b410bf commit e61dd43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
ECR_REPOSITORY: hanghae
IMAGE_TAG: latest
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG --build-arg AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} --build-arg AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM openjdk:17-alpine AS builder

WORKDIR app
ARG AWS_ACCESS_KEY_ID=ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY=SECRET_ACCESS_KEY

ENV ACTIVE_PROFILE prod

COPY ./commerce-api/build/libs/commerce-api-0.0.1.jar .
CMD java -jar -Dspring.profiles.active=${ACTIVE_PROFILE} commerce-api-0.0.1.jar
CMD java -jar -Dspring.profiles.active=${ACTIVE_PROFILE} -DaccessKeyId=${AWS_ACCESS_KEY_ID} -DsecretAccessKey=${AWS_SECRET_ACCESS_KEY} commerce-api-0.0.1.jar

0 comments on commit e61dd43

Please sign in to comment.