-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
52 lines (47 loc) · 1.11 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
49
50
51
52
version: "3.7"
services:
mariadb:
image: mariadb:latest
container_name: mariadb
environment:
MYSQL_ROOT_PASSWORD: ${MARIA_PASSWORD}
MYSQL_DATABASE: ${MARIA_DATABASE}
MYSQL_USER: ${MARIA_USER}
MYSQL_PASSWORD: ${MARIA_PASSWORD}
volumes:
- mariadb_data:/var/lib/mysql # 명명된 볼륨 사용
command:
[
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--lower_case_table_names=1",
"--max_connections=2048",
"--wait_timeout=3600"
]
ports:
- "${MARIA_PORT}:${MARIA_PORT}"
restart: always
redis:
image: redis:latest
container_name: redis
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_HOST: ${REDIS_HOST}
volumes:
- redis_data:/data # 명명된 볼륨을 사용
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
restart: always
backend:
image: ${DOCKER_REPO}
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- mariadb
- redis
volumes:
mariadb_data:
redis_data: