Skip to content

Commit

Permalink
feat : docker-compose 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
sycuuui committed Mar 21, 2024
1 parent c39ed29 commit 9effbfd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/docker-compose.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ jobs:
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }}
script: |
sudo docker-compose -f docker-compose.yml down
sudo docker login -u ${{ secrets.DOCKERHUB_NAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
sudo docker-compose -f docker-compose.yml pull
sudo docker-compose -f docker-compose.yml up -d
sudo docker-compose stop ${{ secrets.DOCKER_SERVICE_NAME }}
sudo docker-compose rm -f ${{ secrets.DOCKER_SERVICE_NAME }}
sudo docker pull ${{ secrets.DOCKERHUB_NAME }}/${{ secrets.DOCKERHUB_REPOSITORY}}
sudo docker tag ${{ secrets.DOCKERHUB_NAME }}/${{ secrets.DOCKERHUB_REPOSITORY}} ${{ secrets.DOCKER_IMAGE_NAME }}
sudo docker-compose up -d
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3'
services:
flask:
container_name: server
image: flask
ports:
- "5000:5000"
networks:
- network

networks:
network:
driver: bridge

0 comments on commit 9effbfd

Please sign in to comment.