File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 11version : " 3.9"
22
3+ # 개발환경에서는 redis만 실행하셔도 무관합니다
34services :
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
1327volumes :
14- redis_data:
28+ redis_data :
29+ mysql_data:
Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ docker network create common
213213# redis 설치
214214docker run -d \
215215 --name redis_1 \
216+ --restart unless-stopped \
216217 --network common \
217218 -p 6379:6379 \
218219 -e TZ=Asia/Seoul \
You can’t perform that action at this time.
0 commit comments