-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
63 lines (60 loc) ยท 1.68 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
53
54
55
56
57
58
59
60
61
62
63
# docker-compose ๋ฒ์ ผ
version: '3.7'
# ์ปจํ
์ด๋ ๋ชฉ๋ก
services:
# ์ปจํ
์ด๋ ์ด๋ฆ ๋ณ์์ฒ๋ผ ์ง์ ๊ณ ๋ฅด๋ฉด ๋๋ค.
database:
# ์ปจํ
์ด๋์ ์ฌ์ฉํ ์ด๋ฏธ์ง
image: mysql:latest
# ํฌํธ ์ฐ๊ฒฐ ์ค์
ports:
- 3306:3306
cap_add:
- SYS_NICE # CAP_SYS_NICE
# ์ปจํ
์ด๋ ์คํ์์ ํ๊ฒฝ๋ณ์ ์ฌ์ฉ
environment:
MYSQL_PASSWORD: dogdog1234!
MYSQL_DATABASE: petmily
MYSQL_USER: root
MYSQL_ROOT_PASSWORD: dogdog1234!
# ์ฌ์์ํ๋ ์กฐ๊ฑด
command: # ๋ช
๋ น์ด ์คํ
# character-set & collision
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
# Access denied
- --default-authentication-plugin=mysql_native_password
restart: on-failure
volumes:
# - ./database/init:/docker-entrypoint-initdb.d
- ./database/conf.d:/etc/mysql/conf.d
# ๋คํธ์ํฌ ์ค์
networks:
default:
ipv4_address: 172.16.2.2
server:
# ์ปจํ
์ด๋์ ์ฌ์ฉํ Dockerfile์ด ์๋ ๊ฒฝ๋ก, image ๋์ ์ ์ฐ๋ฉด, ์๋ ๊ฒฝ์ฐ ์ด๋ฏธ์ง๋ฅผ ์๋์ผ๋ก ๋น๋ํ๊ณ ์ปจํ
์ด๋๋ฅผ ์์ฑํ๋ค.
build:
context: .
dockerfile: Dockerfile
restart: on-failure
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules # Remove this if you have pure JS dependencies
ports:
- 5000:3000
links:
- database
depends_on:
- database
# ๊ธฐ๋ณธ์ ์ผ๋ก ์จ์๋ CMD๋ ENTRYPOINT์ ๋ฎ์ด์ธ ๋ด์ฉ
entrypoint: 'yarn start:dev'
networks:
default:
ipv4_address: 172.16.2.3
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.16.2.0/24