Skip to content

Commit

Permalink
chore(CI/CD) : Dockerfile-staging 파일경로 수정 및 DOCKER-CD-STAGING.yml log…
Browse files Browse the repository at this point in the history
…in docker hub 내용 수정
  • Loading branch information
0-tae committed Jan 27, 2025
1 parent d7ea62b commit 0139f0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/DOCKER-CD-STAGING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:

jobs:
ci:
# Using Environment - prod 환경 사용
# environment: prod
# Using Environment - staging 환경 사용
# environment: staging
runs-on: ubuntu-24.04
env:
working-directory: .
Expand Down Expand Up @@ -38,15 +38,15 @@ jobs:
run: |
mkdir -p ./src/main/resources && cd $_
touch ./application.yml
echo "${{ secrets.YML }}" > ./application.yml
echo "${{ secrets.YML_ACTIVE_STAGING }}" > ./application.yml
cat ./application.yml
working-directory: ${{ env.working-directory }}

- name: application-staging.yml 생성
run: |
cd ./src/main/resources
touch ./application-staging.yml
echo "${{ secrets.PROD_YML }}" > ./application-staging.yml
echo "${{ secrets.STAGING_YML }}" > ./application-staging.yml
working-directory: ${{ env.working-directory }}

- name: 빌드
Expand All @@ -62,8 +62,8 @@ jobs:
- name: login docker hub
uses: docker/[email protected]
with:
username: ${{ secrets.STAGING_DOCKER_LOGIN_USERNAME }}
password: ${{ secrets.STAGING_DOCKER_LOGIN_ACCESSTOKEN }}
username: ${{ secrets.PROD_DOCKER_LOGIN_USERNAME }}
password: ${{ secrets.PROD_DOCKER_LOGIN_ACCESSTOKEN }}

- name: docker image 빌드 및 푸시
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-staging
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM amazoncorretto:21
WORKDIR /app

# Copy JAR file to the container
COPY build/libs/noostak-0.0.1-SNAPSHOT.jar /app/noostak.jar
COPY build/libs/noostak-0.0.1-SNAPSHOT.jar /app/noostak-0.0.1-SNAPSHOT.jar

# Set environment variables for timezone and Spring profile
ENV TZ=Asia/Seoul
Expand All @@ -15,4 +15,4 @@ ENV SPRING_PROFILES_ACTIVE=staging
EXPOSE 8080

# Run the application
CMD ["java", "-Duser.timezone=$TZ", "-jar", "-Dspring.profiles.active=$SPRING_PROFILES_ACTIVE", "noostak.jar"]
CMD ["java", "-Duser.timezone=$TZ", "-jar", "-Dspring.profiles.active=$SPRING_PROFILES_ACTIVE", "noostak-0.0.1-SNAPSHOT.jar"]

0 comments on commit 0139f0a

Please sign in to comment.