-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.local.yml
88 lines (82 loc) · 1.76 KB
/
docker-compose.local.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
version: "3.9"
services:
spring1:
container_name: spring1
restart: always
build:
context: .
dockerfile: Dockerfile
environment:
SERVER_MODE: spring1
MYSQL_USERNAME: "${MYSQL_USERNAME}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
ports:
- "8081:8080"
depends_on:
- mysql
- redis
- nginx
networks:
- local
spring2:
container_name: spring2
restart: always
build:
context: .
dockerfile: Dockerfile
environment:
SERVER_MODE: spring2
MYSQL_USERNAME: "${MYSQL_USERNAME}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
ports:
- "8082:8080"
depends_on:
- mysql
- redis
- nginx
networks:
- local
nginx:
container_name: nginx
image: nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/local/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/local/conf.d/application.conf:/etc/nginx/conf.d/application.conf
- ./nginx/local/conf.d/service-url.inc:/etc/nginx/conf.d/service-url.inc
environment:
- TZ=Asia/Seoul
networks:
- local
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
networks:
- local
redis:
container_name: redis
image: redis
restart: always
ports:
- "6379:6379"
networks:
- local
networks:
local:
driver: bridge