-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
112 lines (102 loc) · 2.46 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: "3"
services:
mysql:
container_name: db-mysql
image: mysql/mysql-server:8.0
tty: true
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: Asia/Seoul
volumes:
- mysql-data:/var/lib/mysql
command:
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_unicode_ci'
ports:
- '3306:3306'
expose:
- "3306"
networks:
- app-tier
database-adminer:
container_name: db-adminer
image: adminer:latest
ports:
- "18080:8080"
environment:
- ADMINER_DEFAULT_SERVER=db-mysql
- ADMINER_DESIGN=hydra
- ADMINER_PLUGINS=tables-filter tinymce
networks:
- app-tier
backend:
container_name: backend-springboot
build: ./backend/
restart: always
ports:
- "8080:8080"
# depends_on:
# - db-mysql
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db-mysql:3306/voilio
SPRING_DATASOURCE_USERNAME: ${MYSQL_USER}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
SPRING_JPA_HIBERNATE_DDL_AUTO: update
expose:
- 8080
networks:
- app-tier
frontend:
container_name: frontend-react
build:
context: ./frontend
# ports:
# - "3000:3000"
environment:
- REACT_APP_BACKEND_URL= http://voilio.site
volumes:
- ./frontend/:/frontend
- build_folder:/frontend/build
- ./frontend/node_modules/:/frontend/node_modules
networks:
- app-tier
stdin_open: true
tty: true
nginx:
image: nginx
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- "80:80"
volumes: # 호스트 디렉터리의 파일과 도커 컨테이너의 파일을 매핑한다.
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
- build_folder:/var/www/frontend
- ./nginx/log:/var/log/nginx
depends_on:
- backend
- frontend
expose:
- 80
restart: always
networks:
- app-tier
# nginx:
# image: nginx
# ports:
# - "80:80"
# volumes: # 호스트 디렉터리의 파일과 도커 컨테이너의 파일을 매핑한다.
# - build_folder:/var/www/frontend
# depends_on:
# - backend
# - frontend
# restart: always
networks:
app-tier:
driver: bridge
volumes:
mysql-data:
build_folder: