Skip to content

Commit

Permalink
feat: nginx 추가 #3
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdtkdgns committed Nov 20, 2023
1 parent 899fe3b commit 864ed56
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
ACTIVE_PROFILE: "prod"
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_IMAGE_NAME: ${{ secrets.DOCKERHUB_IMAGE_NAME }}
DOCKERHUB_IMAGE_NAME: ${{ secrets.DOCKERHUB_IMAGE_NAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}

permissions:
Expand Down Expand Up @@ -52,6 +53,9 @@ jobs:
needs: build_and_push
runs-on: ubuntu-latest
steps:
- name: Set image tag from Output
run: echo "IMAGE_TAG=${{ needs.build-and-push.outputs.image_tag }}" >> $GITHUB_ENV

- name: Get Public IP
id: publicip
run: |
Expand Down Expand Up @@ -87,7 +91,8 @@ jobs:
sudo docker rm $(sudo docker ps -a -q)
sudo docker rmi $(sudo docker images -q)
sudo docker pull $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}}
sudo docker run -d --restart unless-stopped --name server --hostname server --env-file ~/susu/.env -e TZ=Asia/Seoul --expose 8080 --log-driver=awslogs --log-opt awslogs-group=susu --log-opt awslogs-region=ap-northeast-2 --log-opt awslogs-stream=server $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}}
sudo docker run --restart unless-stopped --name server --hostname server --env-file ~/susu/.env -e TZ=Asia/Seoul --expose 8080 --log-driver=awslogs --log-opt awslogs-group=susu --log-opt awslogs-region=ap-northeast-2 --log-opt awslogs-stream=server $DOCKERHUB_USERNAME/$DOCKERHUB_IMAGE_NAME:${{env.IMAGE_TAG}} -d
sudo docker run --name nginx --restart always -p 80:80 --depends-on server $DOCKERHUB_USERNAME/susu-nginx:0.0.1 -d
sudo docker system prune --all -f
Expand Down

0 comments on commit 864ed56

Please sign in to comment.