Skip to content

Commit 0b3e915

Browse files
author
zhang
committed
Gravitee
1 parent f227d7a commit 0b3e915

File tree

15 files changed

+955
-0
lines changed

15 files changed

+955
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# graviteeio api gateway docker-compose running
2+
3+
fork from graviteeio project && change some deps image
4+
5+
- <https://github.com/rongfengliang/gravitee-docker-compose>
6+
- <https://www.cnblogs.com/rongfengliang/p/10204187.html>
7+
8+
## how to run
9+
10+
```code
11+
cd platform && docker-compose up -d
12+
```
13+
14+
## manager ui
15+
16+
* api portal
17+
18+
```code
19+
open https://localhost/apim/portal
20+
```
21+
22+
* access manager ui
23+
24+
```code
25+
open https://localhost/am/ui/
26+
```
27+
28+
## Note:
29+
30+
- environments directory has some demos with ci && traefik gateway
31+
- portal account admin amdin
32+
- access manager ui account admin adminadmin
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#-------------------------------------------------------------------------------
13+
version: '2'
14+
15+
services:
16+
ci:
17+
image: graviteeio/jenkins:latest
18+
container_name: ci
19+
network_mode: "bridge"
20+
expose:
21+
- 50022
22+
ports:
23+
- "50022:50022"
24+
labels:
25+
- "traefik.frontend.rule=Host:ci.gravitee.io"
26+
- "traefik.port=8080"
27+
volumes:
28+
- /var/jenkins_home:/var/jenkins_home
29+
- /var/run/docker.sock:/var/run/docker.sock
30+
links:
31+
- redis-test
32+
- qa
33+
34+
redis-test:
35+
image: redis:3
36+
container_name: redis-test
37+
network_mode: "bridge"
38+
39+
qa:
40+
image: sonarqube:alpine
41+
container_name: qa
42+
network_mode: "bridge"
43+
environment:
44+
- SONARQUBE_JDBC_URL=jdbc:postgresql://sonarqube-db:5432/sonar
45+
labels:
46+
- "traefik.frontend.rule=Host:qa.gravitee.io"
47+
volumes:
48+
- /opt/sonarqube/conf:/opt/sonarqube/conf
49+
- /opt/sonarqube/data:/opt/sonarqube/data
50+
- /opt/sonarqube/extensions:/opt/sonarqube/extensions
51+
- /opt/sonarqube/bundled-plugins:/opt/sonarqube/lib/bundled-plugins
52+
links:
53+
- sonarqube-db
54+
55+
sonarqube-db:
56+
image: postgres:alpine
57+
network_mode: "bridge"
58+
environment:
59+
- POSTGRES_USER=sonar
60+
- POSTGRES_PASSWORD=sonar
61+
volumes:
62+
- /opt/sonarqube/postgresql/data:/var/lib/postgresql/data
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#-------------------------------------------------------------------------------
13+
version: '2'
14+
15+
volumes:
16+
datamongo: {}
17+
dataelasticsearch: {}
18+
19+
services:
20+
elasticsearch:
21+
hostname: demo-elasticsearch
22+
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.3
23+
volumes:
24+
- dataelasticsearch:/usr/share/elasticsearch/data
25+
environment:
26+
- http.host=0.0.0.0
27+
- transport.host=0.0.0.0
28+
- xpack.security.enabled=false
29+
- xpack.monitoring.enabled=false
30+
- cluster.name=elasticsearch
31+
- bootstrap.memory_lock=true
32+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
33+
ulimits:
34+
memlock:
35+
soft: -1
36+
hard: -1
37+
nofile: 65536
38+
39+
mongodb:
40+
hostname: demo-mongodb
41+
image: mongo:3.4
42+
volumes:
43+
- datamongo:/data/db
44+
45+
gateway:
46+
hostname: demo-gateway
47+
image: graviteeio/gateway:latest
48+
environment:
49+
- gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
50+
- gravitee_ratelimit_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
51+
- gravitee_reporters_elasticsearch_endpoints_0=http://elasticsearch:9200
52+
53+
managementui:
54+
hostname: demo-managementui
55+
image: graviteeio/management-ui:latest
56+
57+
managementapi:
58+
hostname: demo-managementapi
59+
image: graviteeio/management-api:latest
60+
environment:
61+
- gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
62+
- gravitee_analytics_elasticsearch_endpoints_0=http://elasticsearch:9200
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#-------------------------------------------------------------------------------
13+
version: '2'
14+
15+
volumes:
16+
local_datamongo: {}
17+
local_dataelasticsearch: {}
18+
19+
services:
20+
local_elasticsearch:
21+
extends:
22+
file: common.yml
23+
service: elasticsearch
24+
volumes:
25+
- local_dataelasticsearch:/usr/share/elasticsearch/data
26+
- ./logs/elasticsearch:/var/log/elasticsearch
27+
28+
local_mongodb:
29+
extends:
30+
file: common.yml
31+
service: mongodb
32+
volumes:
33+
- local_datamongo:/data/db
34+
- ./logs/mongodb:/var/log/mongodb
35+
36+
local_gateway:
37+
extends:
38+
file: common.yml
39+
service: gateway
40+
links:
41+
- "local_mongodb:demo-mongodb"
42+
- "local_elasticsearch:demo-elasticsearch"
43+
ports:
44+
- "8000:8082"
45+
volumes:
46+
- ./logs/gateway:/etc/gravitee.io/log
47+
environment:
48+
- gravitee_management_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
49+
- gravitee_ratelimit_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
50+
- gravitee_reporters_elasticsearch_endpoints_0=http://demo-elasticsearch:9200
51+
52+
local_managementui:
53+
extends:
54+
file: common.yml
55+
service: managementui
56+
ports:
57+
- "8002:80"
58+
volumes:
59+
- ./logs/management-ui:/var/log/httpd
60+
environment:
61+
- MGMT_API_URL=http:\/\/localhost:8005\/management\/
62+
63+
local_managementapi:
64+
extends:
65+
file: common.yml
66+
service: managementapi
67+
ports:
68+
- "8005:8083"
69+
volumes:
70+
- ./logs/management-api:/home/gravitee/logs
71+
links:
72+
- "local_mongodb:demo-mongodb"
73+
- "local_elasticsearch:demo-elasticsearch"
74+
environment:
75+
- gravitee_management_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
76+
- gravitee_analytics_elasticsearch_endpoints_0=http://demo-elasticsearch:9200
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#-------------------------------------------------------------------------------
13+
version: '2'
14+
15+
volumes:
16+
latest_datamongo: {}
17+
latest_dataelasticsearch: {}
18+
19+
services:
20+
latest_elasticsearch:
21+
network_mode: "bridge"
22+
extends:
23+
file: common.yml
24+
service: elasticsearch
25+
volumes:
26+
- latest_dataelasticsearch:/usr/share/elasticsearch/data
27+
28+
latest_mongodb:
29+
network_mode: "bridge"
30+
extends:
31+
file: common.yml
32+
service: mongodb
33+
volumes:
34+
- latest_datamongo:/data/db
35+
36+
latest_gateway:
37+
network_mode: "bridge"
38+
extends:
39+
file: common.yml
40+
service: gateway
41+
links:
42+
- latest_mongodb
43+
- latest_elasticsearch
44+
labels:
45+
- "traefik.backend=graviteeio-gateway"
46+
- "traefik.frontend.rule=Host:demo.gravitee.io;PathPrefixStrip:/gateway"
47+
environment:
48+
- gravitee_management_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
49+
- gravitee_ratelimit_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
50+
- gravitee_reporters_elasticsearch_endpoints_0=http://demo-elasticsearch:9200
51+
52+
latest_managementui:
53+
network_mode: "bridge"
54+
extends:
55+
file: common.yml
56+
service: managementui
57+
labels:
58+
- "traefik.backend=graviteeio-managementui"
59+
- "traefik.frontend.rule=Host:demo.gravitee.io"
60+
environment:
61+
- MGMT_API_URL=https:\/\/demo.gravitee.io\/management\/
62+
63+
latest_managementapi:
64+
network_mode: "bridge"
65+
extends:
66+
file: common.yml
67+
service: managementapi
68+
labels:
69+
- "traefik.backend=graviteeio-managementapi"
70+
- "traefik.frontend.rule=Host:demo.gravitee.io;PathPrefix:/management"
71+
links:
72+
- latest_mongodb
73+
- latest_elasticsearch
74+
environment:
75+
- gravitee_management_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
76+
- gravitee_analytics_elasticsearch_endpoints_0=http://demo-elasticsearch:9200
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#-------------------------------------------------------------------------------
2+
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#-------------------------------------------------------------------------------
13+
version: '2'
14+
15+
volumes:
16+
nightly_datamongo: {}
17+
nightly_dataelasticsearch: {}
18+
19+
services:
20+
nightly_elasticsearch:
21+
network_mode: "bridge"
22+
extends:
23+
file: common.yml
24+
service: elasticsearch
25+
volumes:
26+
- nightly_dataelasticsearch:/usr/share/elasticsearch/data
27+
28+
nightly_mongodb:
29+
network_mode: "bridge"
30+
extends:
31+
file: common.yml
32+
service: mongodb
33+
volumes:
34+
- nightly_datamongo:/data/db
35+
36+
nightly_gateway:
37+
image: graviteeio/gateway:nightly
38+
network_mode: "bridge"
39+
extends:
40+
file: common.yml
41+
service: gateway
42+
links:
43+
- nightly_mongodb
44+
- nightly_elasticsearch
45+
labels:
46+
- "traefik.backend=nightly-graviteeio-gateway"
47+
- "traefik.frontend.rule=Host:nightly.gravitee.io;PathPrefixStrip:/gateway"
48+
environment:
49+
- gravitee_management_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
50+
- gravitee_ratelimit_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
51+
- gravitee_reporters_elasticsearch_endpoints_0=http://demo-elasticsearch:9200
52+
53+
nightly_managementui:
54+
image: graviteeio/management-ui:nightly
55+
network_mode: "bridge"
56+
extends:
57+
file: common.yml
58+
service: managementui
59+
labels:
60+
- "traefik.backend=nightly-graviteeio-managementui"
61+
- "traefik.frontend.rule=Host:nightly.gravitee.io"
62+
environment:
63+
- MGMT_API_URL=https:\/\/nightly.gravitee.io\/management\/
64+
65+
nightly_managementapi:
66+
image: graviteeio/management-api:nightly
67+
network_mode: "bridge"
68+
extends:
69+
file: common.yml
70+
service: managementapi
71+
labels:
72+
- "traefik.backend=nightly-graviteeio-managementapi"
73+
- "traefik.frontend.rule=Host:nightly.gravitee.io;PathPrefix:/management"
74+
links:
75+
- nightly_mongodb
76+
- nightly_elasticsearch
77+
environment:
78+
- gravitee_management_mongodb_uri=mongodb://demo-mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
79+
- gravitee_analytics_elasticsearch_endpoints_0=http://demo-elasticsearch:9200

0 commit comments

Comments
 (0)