-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yml
70 lines (65 loc) · 1.57 KB
/
docker-compose.dev.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
version: "3.9"
services:
spring1:
container_name: spring1
restart: always
image: docker-image # cd.yml로 이미지 설정
environment:
SERVER_MODE: spring1,dev
MYSQL_USERNAME: "${MYSQL_USERNAME}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
ports:
- "8081:8080"
depends_on:
- mysql
- redis
- nginx
spring2:
container_name: spring2
restart: always
image: docker-image # cd.yml로 이미지 설정
environment:
SERVER_MODE: spring2,dev
MYSQL_USERNAME: "${MYSQL_USERNAME}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
ports:
- "8082:8080"
depends_on:
- mysql
- redis
- nginx
nginx:
container_name: nginx
image: nginx
restart: always
ports:
- "80:80/tcp"
- "443:443"
volumes:
- ~/nginx/nginx.conf:/etc/nginx/nginx.conf
- ~/nginx/conf.d/application.conf:/etc/nginx/conf.d/application.conf
- ~/nginx/conf.d/service-url.inc:/etc/nginx/conf.d/service-url.inc
environment:
- TZ=Asia/Seoul
mysql:
container_name: mysql
image: mysql:8.0
restart: always
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: istock
MYSQL_USER: "${MYSQL_USERNAME}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
volumes:
- ~/istock-volume/mysql:/var/lib/mysql
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
redis:
container_name: redis
image: redis
restart: always
ports:
- "6379:6379"