-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
48 lines (45 loc) · 1.24 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 로컬 개발 환경을 위한 docker-compose 파일
services:
mysql:
image: mysql:8.4
container_name: mysql_server
ports:
- 3308:3306
networks:
- infra_network
volumes:
- ./docker-volume/mysql/data:/var/lib/mysql
- ./docker-volume/mysql/init:/docker-entrypoint-initdb.d
command:
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_unicode_ci'
environment:
MYSQL_DATABASE: til
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: pw@1234
redis:
image: redis:latest
container_name: redis_server
volumes:
- ./docker-volume/redis/data:/data
ports:
- "6379:6379"
networks:
- infra_network
- redis_network
command: [ "sh", "-c", "redis-server --requirepass pw@1234 --bind 0.0.0.0" ]
redis_client:
image: redis:latest
container_name: redis_client
entrypoint: [ "/bin/bash", "-c", "echo 'alias redis-cli-connect=\"redis-cli -h redis_server -a pw@1234\"' >> ~/.bashrc && /bin/bash" ]
depends_on:
- redis
networks:
- redis_network
stdin_open: true
tty: true
networks:
infra_network: # 다른 컨테이너와 통신을 위한 네트워크
name: infra_network
driver: bridge
redis_network: