Skip to content

Commit

Permalink
[feat] nginx clone 없이 도커허브로 받아오기
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroom1324 committed Dec 18, 2023
1 parent 3955b22 commit baace29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker build & push
- name: Docker app build & push
uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -42,6 +42,15 @@ jobs:
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/ceos-backend-dev

- name: Docker nginx build & push
uses: docker/build-push-action@v2
with:
context: .
file: ./config/nginx/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/ceos-nginx-dev

# ssh 접근 후 docker 이미지 pull 및 컨테이너 재시작
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
Expand All @@ -60,6 +69,7 @@ jobs:
sudo chmod 666 /var/run/docker.sock
sudo docker rm -f $(docker ps -qa)
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/ceos-backend-dev
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/ceos-nginx-dev
docker-compose -f docker-compose.dev.yml --env-file ./.env up -d
docker image prune -f
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ services:
- "8080"

nginx:
image: ceos17/ceos-nginx-dev
depends_on:
- backend
restart: always
build:
dockerfile: Dockerfile
context: ./config/nginx
ports:
- "80:80"

Expand Down

0 comments on commit baace29

Please sign in to comment.