-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
48 lines (46 loc) · 1.43 KB
/
docker-compose.yaml
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
version: '3.8'
services:
mysql:
image: mysql:8.0.41
container_name: db
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=test
- LC_ALL=C.UTF-8
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
# 레거시 데이터가 `0000-00-00 00:00:00`와 같은 non-standard 데이터를 갖고 있어,
# `NO_ZERO_IN_DATE`와 `NO_ZERO_DATE`를 `sql_mode`로부터 제외시킵니다.
# 사이트 시스템 마이그레이션이 완료된 뒤에는 제거해야 합니다.
# @see https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_sql_mode
- --sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
volumes:
- ./.mysql/:/docker-entrypoint-initdb.d
healthcheck:
test: [
"CMD-SHELL",
"mysql -uroot -ptest -e 'SELECT 1;' || exit 1"
]
interval: 1s
timeout: 1s
retries: 20
start_period: 5s
sight:
build:
context: .
dockerfile: Dockerfile.Local
container_name: sight-backend
restart: always
ports:
- 3000:3000
environment:
- NODE_ENV=development
depends_on:
mysql:
condition: service_healthy
volumes:
- .:/sight
# 개발 환경과 도커 환경의 OS가 다르기 때문에 `node_modules`를 공유하지 않습니다.
- /sight/node_modules