Skip to content

Commit

Permalink
chore: properties sudo 로 설정하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Dh3356 committed Sep 14, 2024
1 parent e99ddba commit 72685f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ jobs:
needs: build-docker-image
runs-on: ubuntu-latest
steps:
- name: set application-dev.properties
- name: set application-prod.properties
run: |
mkdir -p ~/properties/prod
cd ~/properties/prod
touch ./application-prod.properties
echo "${{ secrets.PROPERTIES }}" > ./application-prod.properties
sudo mkdir -p ~/properties/prod
sudo cd ~/properties/prod
sudo touch ./application-prod.properties
sudo echo "${{ secrets.PROPERTIES }}" > ./application-prod.properties
shell: bash

- name: ssh connect & production
Expand All @@ -76,7 +76,7 @@ jobs:
sudo docker pull ${{secrets.DOCKERHUB_USERNAME}}/${{secrets.DOCKERHUB_IMAGE}}
sudo docker ps -q | xargs -r sudo docker stop
sudo docker ps -aq | xargs -r sudo docker rm
sudo docker run --name ${{secrets.DOCKERHUB_IMAGE}} -d -p 8080:8080 -v ~/properties:/properties -e SPRING_PROFILES_ACTIVE=prod -e SPRING_CONFIG_LOCATION=/properties/application-prod.properties ${{secrets.DOCKERHUB_USERNAME}}/${{secrets.DOCKERHUB_IMAGE}}
sudo docker run --name ${{secrets.DOCKERHUB_IMAGE}} -d -p 8080:8080 -v ~/properties:/properties -e SPRING_PROFILES_ACTIVE=prod -e SPRING_CONFIG_LOCATION=/properties/prod/application-prod.properties ${{secrets.DOCKERHUB_USERNAME}}/${{secrets.DOCKERHUB_IMAGE}}
sudo docker system prune -f
Expand Down

0 comments on commit 72685f9

Please sign in to comment.