diff --git a/.github/workflows/CD_Prod.yml b/.github/workflows/CD_Prod.yml index 478d272..deb6e0d 100644 --- a/.github/workflows/CD_Prod.yml +++ b/.github/workflows/CD_Prod.yml @@ -80,18 +80,3 @@ jobs: sudo docker pull ${{ secrets.DOCKER_USERNAME }}/myongsik sudo docker run -d --name myongsik_prod1 -v /var/log/app:/var/log/app -v /etc/localtime:/etc/localtime:ro -e JAVA_OPTS=-Djasypt.encryptor.password=${{ secrets.YML_PASSWORD }} -e TZ=Asia/Seoul -e ENVIRONMENT_VALUE=-Dspring.profiles.active=prod -p 8085:8080 ${{ secrets.DOCKER_USERNAME }}/myongsik:latest docker rmi -f $(docker images -f "dangling=true" -q) - - # 10) Deploy (PROD2) - - name: Deploy (PROD2) - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.EC2_HOST_PROD2 }} - username: ${{ secrets.EC2_USERNAME }} - key: ${{ secrets.EC2_KEY }} - script: | - docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker stop myongsik_prod2 - docker rm myongsik_prod2 - sudo docker pull ${{ secrets.DOCKER_USERNAME }}/myongsik - sudo docker run -d --name myongsik_prod2 -v /var/log/app:/var/log/app -v /etc/localtime:/etc/localtime:ro -e JAVA_OPTS=-Djasypt.encryptor.password=${{ secrets.YML_PASSWORD }} -e TZ=Asia/Seoul -e ENVIRONMENT_VALUE=-Dspring.profiles.active=prod -p 8085:8080 ${{ secrets.DOCKER_USERNAME }}/myongsik:latest - docker rmi -f $(docker images -f "dangling=true" -q)