-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from swm-standard/rin/swm-145
Infra: docker compose file ์ธํ & cdํ์ผ ์์
- Loading branch information
Showing
2 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |