Skip to content

Commit

Permalink
Merge pull request #165 from swm-standard/rin/swm-145
Browse files Browse the repository at this point in the history
Infra: docker compose file ์„ธํŒ… & cdํŒŒ์ผ ์ˆ˜์ •
  • Loading branch information
RinRinPARK authored Aug 8, 2024
2 parents 49e381d + 2032dcd commit fc08017
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/develop-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ jobs:
- name: Deploy
uses: appleboy/[email protected]
env:
COMPOSE: "/home/ubuntu/compose/docker-compose-dev.yml"
with:
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.DEV_PRIVATE_KEY }}
port: ${{ secrets.DEV_PORT }}
envs: COMPOSE
script: |
docker pull ${{ secrets.DOCKER_USERNAME }}/phote:latest
docker stop $(docker ps -a -q)
docker run -d --log-driver=syslog -p 8080:8080 ${{ secrets.DOCKER_USERNAME }}/phote:latest
docker rm $(docker ps --filter 'status=exited' -a -q)
docker image prune -a -f
sudo docker-compose -f $COMPOSE down --rmi all
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/phote:latest
sudo docker-compose -f $COMPOSE up -d
23 changes: 20 additions & 3 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
services:
redis:
image: redis
container_name: redis
container_name: myredis
restart: unless-stopped
volumes:
- /var/lib/docker/volumes/redis-volume/_data:/data
- /var/lib/docker/volumes/redis-volume/_data:/data
ports:
- "6379:6379"
environment:
- TZ=Asia/Seoul
hostname: redis
networks:
- phote-network

jarimage:
image: ${{ secrets.DOCKER_USERNAME }}/phote:latest
restart: unless-stopped
container_name: myphote
environment:
- TZ=Asia/Seoul
ports:
- 8080:8080
networks:
- phote-network


networks:
phote-network:
external: true

0 comments on commit fc08017

Please sign in to comment.