-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·77 lines (71 loc) · 1.41 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: "3.7"
services:
nginx:
container_name: nginx
image: nginx
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- 80:80
depends_on:
- backend
networks:
- app-tier
frontend:
container_name: frontend
#Dockerfile의 경로
build:
context: ./frontend
dockerfile: Dockerfile
platform: linux/amd64
ports:
- 3000:3000
networks:
- app-tier
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 8080:8080
networks:
- app-tier
depends_on:
- mysql
restart: on-failure
mysql:
container_name: mysql
build:
context: ./mysql
dockerfile: Dockerfile
platform: linux/amd64
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: password
ports:
- "3306:3306"
volumes:
# init.sql로 db 초기화
- ./mysql/mysql-init-file:/docker-entrypoint-initdb.d/:ro
- ./mysql/data:/var/lib/mysql
networks:
- app-tier
depends_on:
- redis
redis:
container_name: redis
image: redis:alpine
command: redis-server --port 6379
hostname: redis_host
labels:
- "name=redis"
- "mode=standalone"
ports:
- 6379:6379
networks:
- app-tier
networks:
app-tier:
driver: bridge