forked from jhongwei80/tesla
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
109 lines (109 loc) · 2.76 KB
/
docker-compose.yaml
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
version: '3.7'
services:
tesla-eureka:
container_name: tesla-eureka
image: yunterry/spring-cloud-eureka
deploy:
resources:
limits:
cpus: '0.5'
memory: 1024M
reservations:
cpus: '0.25'
memory: 512M
ports:
- "8761:8761"
restart: always
tesla-mysql:
container_name: tesla-mysql
image: mysql:5.7
deploy:
resources:
limits:
cpus: '0.5'
memory: 1024M
reservations:
cpus: '0.25'
memory: 512M
ports:
- "3306:3306"
command: --character-set-server=utf8 --collation-server=utf8_general_ci --max-allowed-packet=104857600
volumes:
- ./sql:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: gateway
MYSQL_USER: user
MYSQL_PASSWORD: 123456
LANG: C.UTF-8
restart: always
tesla-backend-sample:
container_name: tesla-backend-sample
image: tesla-backend-sample:1.0.0
deploy:
resources:
limits:
cpus: '0.5'
memory: 1024M
reservations:
cpus: '0.25'
memory: 512M
ports:
- 8902:8902
- 2181:2181
depends_on:
- tesla-eureka
environment:
- EUREKA_SERVER=http://tesla-eureka:8761/eureka/
restart: always
tesla-ops:
container_name: tesla-ops
image: tesla-ops:1.0.0
deploy:
resources:
limits:
cpus: '0.5'
memory: 1024M
reservations:
cpus: '0.25'
memory: 512M
command: ["dockerize", "-wait", "tcp://tesla-mysql:3306", "-timeout", "1800s","./start.sh"]
ports:
- 8080:8080
environment:
- DATABASE_HOST=tesla-mysql
- DATABASE_USER=root
- DATABASE_PASSWORD=123456
- DATABASE_NAME=gateway
- DATABASE_PORT=3306
- EUREKA_SERVER=http://tesla-eureka:8761/eureka/
restart: always
tesla-gateway:
container_name: tesla-gateway
image: tesla-gateway:1.0.0
deploy:
resources:
limits:
cpus: '2'
memory: 8192M
reservations:
cpus: '1'
memory: 4096M
command: ["dockerize", "-wait", "tcp://tesla-mysql:3306", "-wait", "tcp://tesla-backend-sample:2181", "-wait", "tcp://tesla-eureka:8761", "-timeout", "1800s","./start.sh"]
depends_on:
- tesla-mysql
- tesla-backend-sample
- tesla-eureka
ports:
- 9000:9000
- 5701:5701
- 9091:9091
environment:
- DATABASE_HOST=tesla-mysql
- DATABASE_USER=root
- DATABASE_PASSWORD=123456
- DATABASE_NAME=gateway
- DATABASE_PORT=3306
- EUREKA_SERVER=http://tesla-eureka:8761/eureka/
- ZOOKEEPER_SERVER=zookeeper://tesla-backend-sample:2181
restart: always