-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
102 lines (98 loc) · 2.25 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
version : '3.3'
services:
# openresty:
# image: api-gateway:latest
# build:
# context: "./"
# dockerfile: "dockerfile"
# ports:
# - "80:80"
# depends_on:
# - db
# restart: always
# 管理后台Api
gateway-admin:
image: kaomanfen/gateway-admin:0.0.1
restart: always
environment:
GATEWAY_IP_TEST: test-api
GATEWAY_IP_BETA: beta-api
GATEWAY_IP_PROD: prod-api
KVSTORE_API: test-api
BETA_KVSTORE_API: beta-api
TEST_KVSTORE_API: prod-api
APP_KEY: base64:tPJcnqGHGox3P3eT4BJc84mIppZNEwpkv/fe7nJIoLE=
JWT_SECRET: eVCDpAerMa2t97O97umo4rMqpHU9EqqpDp2kETjHxr5AXokozEwlxgW5uYMKS768
depends_on:
- db
# 管理后台页面
gateway-dashboard:
image: kaomanfen/gateway-dashboard:0.0.1
restart: always
ports:
- "10080:80"
depends_on:
- gateway-admin
#测试环境API
test-api:
image: kaomanfen/gateway:0.0.1
restart: always
environment:
ENV: test
DB_HOST: db
DB_PORT: 3306
DB_USER: apigateway
DB_PASSWORD: apigateway
DB_NAME: apigateway
ports:
- "10081:80"
depends_on:
- db
#Beta环境API
beta-api:
image: kaomanfen/gateway:0.0.1
restart: always
environment:
ENV: beta
DB_HOST: db
DB_PORT: 3306
DB_USER: apigateway
DB_PASSWORD: apigateway
DB_NAME: apigateway
ports:
- "10082:80"
depends_on:
- db
#生产环境API
prod-api:
image: kaomanfen/gateway:0.0.1
restart: always
environment:
ENV: prod
DB_HOST: db
DB_PORT: 3306
DB_USER: apigateway
DB_PASSWORD: apigateway
DB_NAME: apigateway
ports:
- "10083:80"
depends_on:
- db
db:
image: mysql:5.7.25
restart: always
command: [
"--innodb_use_native_aio=0",
"--explicit_defaults_for_timestamp=1",
"--default-time-zone=+8:00",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci"
]
volumes:
- "../db/api-gateway:/var/lib/mysql"
- "./deploy/mysql:/docker-entrypoint-initdb.d"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: apigateway
MYSQL_USER: apigateway
MYSQL_PASSWORD: apigateway