Skip to content

Commit

Permalink
script: 도커 컴포즈 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
“adashkdy9960 committed Jan 15, 2024
1 parent a359d5c commit d50eaed
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ jobs:
key: ${{ secrets.AWS_SSH_KEY }}
port: 22
script: |
if docker ps -a --format '{{.ID}}' | grep -q .; then
sudo docker rm -f $(docker ps -qa)
else
echo "No Docker containers to remove."
fi
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/hhive
sudo docker run --name hhive -d ${{ secrets.DOCKERHUB_USERNAME }}/hhive
sudo docker run --name redis-server -d -p 6379:6379 redis
docker image prune -f
docker rm -f $(docker ps -qa)
docker rmi ${{ secrets.DOCKERHUB_USERNAME }}
docker pull ${{ secrets.DOCKERHUB_USERNAME }}
docker-compose up -d
16 changes: 15 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,22 @@ services:
- --collation-server=utf8mb4_unicode_ci
restart: always

spring-app:
build:
context: ./spring-app
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- mysql-db
restart: always


redis:
image: redis:latest
container_name: redis-server
ports:
- "6379:6379"
restart: always



Expand Down

0 comments on commit d50eaed

Please sign in to comment.