Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script: 도커 컴포즈 수정 #58

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading