Skip to content

Commit b6ba7d9

Browse files
committed
Infra: 도커 컴포즈 환경설정 추가
- MySQL 설정 추가 - redis command 설정 삭제
1 parent a4d8484 commit b6ba7d9

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

docker-compose.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
version: "3.9"
22

3+
# 개발환경에서는 redis만 실행하셔도 무관합니다
34
services:
45
redis:
5-
image: redis:6.2
6+
image: redis:7
67
container_name: local-redis
78
ports:
89
- "6379:6379"
910
volumes:
1011
- redis_data:/data
11-
command: ["redis-server", "--appendonly", "yes"]
12+
13+
# 운영환경용 (MySQL)
14+
mysql:
15+
image: mysql:8.0
16+
container_name: local-mysql
17+
environment:
18+
MYSQL_ROOT_PASSWORD: root_pass
19+
MYSQL_DATABASE: testdb
20+
MYSQL_USER: root_user
21+
MYSQL_PASSWORD: root_pass
22+
ports:
23+
- "3306:3306"
24+
volumes:
25+
- mysql_data:/var/lib/mysql
1226

1327
volumes:
14-
redis_data:
28+
redis_data:
29+
mysql_data:

infra/terraform/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ docker network create common
213213
# redis 설치
214214
docker run -d \
215215
--name redis_1 \
216+
--restart unless-stopped \
216217
--network common \
217218
-p 6379:6379 \
218219
-e TZ=Asia/Seoul \

0 commit comments

Comments
 (0)