Skip to content

Commit da7befd

Browse files
author
nimuy99
committed
Feat #64 docker-composer.yml 생성
1 parent 6fdc23f commit da7befd

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ jobs:
5858
5959
ssh -i private_key.pem -o StrictHostKeyChecking=no $EC2_USERNAME@$EC2_HOST "
6060
docker pull $DOCKER_USERNAME/$MY_APP:latest
61-
docker stop $MY_APP || true
62-
docker rm $MY_APP || true
63-
docker run -d -p 8080:8080 --name $MY_APP \
64-
$DOCKER_USERNAME/$MY_APP:latest
61+
62+
docker-compose down || true
63+
64+
docker-compose up -d --remove-orphans
65+
docker image prune -f
6566
"
6667
6768
rm -f private_key.pem

docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: "3.8"
2+
services:
3+
redis:
4+
image: redis
5+
container_name: redis
6+
ports:
7+
- "6379:6379"
8+
9+
spring:
10+
image: nimuy99/memesphere
11+
container_name: memesphere
12+
restart: always
13+
ports:
14+
- "8080:8080"
15+
depends_on:
16+
- redis

0 commit comments

Comments
 (0)