Skip to content

Commit

Permalink
Chore: 환경변수 적용방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
rrosiee committed Jun 1, 2024
1 parent 639eeca commit 5777975
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:
java-version: '11'
distribution: "adopt"

- name: create env file
run: |
echo "${{ secrets.ENV_FILE }}" > ./env
shell: bash

- name: Build with Gradle
run: |
chmod +x ./gradlew
Expand All @@ -46,10 +41,8 @@ jobs:
key: ${{ secrets.KEY }}
envs: GITHUB_SHA
script: |
ls -al
pwd
sudo docker stop ticats
sudo docker rm ticats
sudo docker image rm gabang2/ticats:latest
sudo docker pull gabang2/ticats:latest
sudo docker run -d -p 8080:8080 --name ticats --env-file=env gabang2/ticats:latest
sudo docker run -d -p 8080:8080 --name ticats ${{ secrets.DOCKER_ENV }} gabang2/ticats:latest
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ FROM openjdk:11
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar

# .env 파일을 컨테이너로 복사
COPY env env

# 애플리케이션 실행
ENTRYPOINT ["java", "-jar", "/app.jar"]

0 comments on commit 5777975

Please sign in to comment.