Skip to content

Commit 0a85077

Browse files
authored
Dev > Main 브랜치 병합
1. Docker File Config 파일을 추가하였습니다. 서버 테스트를 위해 Main 브랜치로 병합합니다.
2 parents ef63e48 + cfde434 commit 0a85077

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

.github/workflows/backend-cd.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,6 @@ jobs:
2929
git pull origin main
3030
chmod +x ./gradlew
3131
./gradlew build
32-
33-
pid=$(lsof -ti:8080)
34-
if [ -n "$pid" ]; then
35-
kill -9 $pid
36-
fi
3732
38-
docker stop redis || true
39-
docker rm redis || true
40-
docker run -d --name redis -p 6379:6379 redis
41-
42-
docker stop devpals-container || true
43-
docker rm devpals-container || true
44-
docker build -t devpals-app .
45-
docker run -d -p 8080:8080 --name devpals-container --link redis devpals-app
33+
docker compose down || true
34+
docker compose up -d --build

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: '3.8'
2+
3+
services:
4+
redis:
5+
image: redis
6+
container_name: redis
7+
ports:
8+
- "6379:6379"
9+
10+
backend:
11+
build: .
12+
container_name: devpals-container
13+
ports:
14+
- "8080:8080"
15+
depends_on:
16+
- redis
17+
environment:
18+
SPRING_DATA_REDIS_HOST: redis
19+
SPRING_DATA_REDIS_PORT: 6379
20+
networks:
21+
- devpals-net
22+
23+
networks:
24+
devpals-net:

0 commit comments

Comments
 (0)