Skip to content

Commit

Permalink
ci/cd: compose.yml redis 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SunYerim committed Jun 16, 2024
1 parent 727c362 commit 9b07170
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,17 @@ jobs:
port: ${{ secrets.PORT }}
script: |
docker pull ${{ secrets.DOCKER_USERNAME }}/sunjoo:auth
docker pull ${{ secrets.DOCKER_USERNAME }}/sunjoo:redis
if [ "$(docker ps -aq -f name=sunjoo-server-auth)" ]; then
docker stop sunjoo-server-auth
docker rm sunjoo-server-auth
fi
docker run -d -p 8080:8090 --name sunjoo-server-auth ${{ secrets.DOCKER_USERNAME }}/sunjoo:auth
if [ "$(docker ps -aq -f name=sunjoo-server-redis)" ]; then
docker stop sunjoo-server-redis
docker rm sunjoo-server-redis
fi
docker run -d -p 8080:8090 --name sunjoo-server-auth ${{ secrets.DOCKER_USERNAME }}/sunjoo:auth
docker run -d -p 6379:6379 --name sunjoo-server-redis ${{ secrets.DOCKER_USERNAME }}/sunjoo:redis
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
image: sunyerim/sunjoo:auth
container_name: sunjoo-server-auth
restart: always
# depends_on:
# - redis
depends_on:
- redis
ports:
- "8080:8090"
redis:
Expand Down

0 comments on commit 9b07170

Please sign in to comment.