标签:api 文件处理 its test crt sel https span 入口
Gravitee.io 是一个相对比较完整的api gateway 平台,包含了api 相对比较完整的生命周期管理
同时在访问控制以及日志监控上也做的比较好,是一款可以尝试试用的api gateway 平台
version: ‘3‘
?
networks:
default:
?
services:
nginx:
image: nginx:1.15-alpine
container_name: gio_platform_nginx
restart: always
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/ssl/gio-selfsigned.crt:/etc/ssl/certs/gio-selfsigned.crt
- ./nginx/ssl/gio-selfsigned.key:/etc/ssl/private/gio-selfsigned.key
- ./nginx/ssl/gio.pem:/etc/ssl/certs/gio.pem
ports:
- "80:80"
- "443:443"
depends_on:
- apim_gateway
- apim_portal
- apim_management
- am_gateway
- am_management
- am_webui
?
mongodb:
image: mongo:3.4
restart: always
container_name: gio_platform_mongo
ports:
- 27017:27017
environment:
- MONGO_INITDB_DATABASE=gravitee
volumes:
- ./mongo/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./data/mongo:/data/db
- ./logs/mongodb:/var/log/mongodb
?
elasticsearch:
image: elasticsearch:6.4.0
container_name: gio_platform_elasticsearch
restart: always
ports:
- 9200:9200
environment:
- http.host=0.0.0.0
- transport.host=0.0.0.0
- xpack.security.enabled=false
- xpack.monitoring.enabled=false
- cluster.name=elasticsearch
ulimits:
nofile: 65536
volumes:
- ./data/elasticsearch:/usr/share/elasticsearch/data
- ./logs/elasticsearch:/var/log/elasticsearch
?
apim_gateway:
image: graviteeio/gateway:latest
container_name: gio_platform_apim_gateway
restart: always
volumes:
- ./logs/apim-gateway:/opt/graviteeio-gateway/logs
environment:
- gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
- gravitee_ratelimit_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
- gravitee_reporters_elasticsearch_endpoints_0=http://elasticsearch:9200
depends_on:
- mongodb
- elasticsearch
?
apim_portal:
image: graviteeio/management-ui:latest
container_name: gio_platform_apim_portal
restart: always
environment:
- MGMT_API_URL=https:\/\/localhost\/apim\/management\/
depends_on:
- apim_management
?
apim_management:
image: graviteeio/management-api:latest
container_name: gio_platform_apim_mgmt_api
restart: always
volumes:
- ./logs/apim-management-api:/opt/graviteeio-management-api/logs
environment:
- gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
- gravitee_ratelimit_mongodb_uri=mongodb://mongodb:27017/gravitee?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
- gravitee_analytics_elasticsearch_endpoints_0=http://elasticsearch:9200
- gravitee_jwt_cookiepath=/apim/management
- gravitee_jwt_cookiesecure=true
depends_on:
- mongodb
- elasticsearch
?
am_gateway:
image: graviteeio/am-gateway:2
container_name: gio_platform_am_gateway
restart: always
volumes:
- ./logs/am-gateway:/opt/graviteeio-am-gateway/logs
environment:
- gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee-am?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
- gravitee_oauth2_mongodb_uri=mongodb://mongodb:27017/gravitee-am?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
depends_on:
- mongodb
?
am_management:
image: graviteeio/am-management-api:2
container_name: gio_platform_am_management
restart: always
volumes:
- ./logs/am-management-api:/opt/graviteeio-am-management-api/logs
environment:
- gravitee_management_mongodb_uri=mongodb://mongodb:27017/gravitee-am?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
- gravitee_oauth2_mongodb_uri=mongodb://mongodb:27017/gravitee-am?serverSelectionTimeoutMS=5000&connectTimeoutMS=5000&socketTimeoutMS=5000
- gravitee_jwt_cookiepath=/am/management
- gravitee_jwt_cookiesecure=true
depends_on:
- mongodb
?
am_webui:
image: graviteeio/am-management-ui:2
container_name: gio_platform_am_webui
restart: always
environment:
- MGMT_API_URL=https:\/\/localhost\/am\/
- MGMT_UI_URL=https:\/\/localhost\/am\/ui\/
volumes:
- ./logs/am-webui:/var/log/nginx
depends_on:
- am_management
?
docker-compose up -d
UI 效果 账户admin admin
访问控制管理UI 账户 admin adminadmin
中间的一些步骤按照提示操作即可
同时可以需要进行api 的发布以及启动,界面上还是很全的,直接参考提示操作即可
需要创建app
然后需要创建api 的订阅,我们可以进行审核处理
Gravitee.io 对于api 的管理功能比较全,后边会写一些关于如果使用的简单demo
https://docs.gravitee.io/apim_quickstart_publish.html
https://docs.gravitee.io/apim_quickstart_consume.html
https://github.com/gravitee-io/gravitee-docker
标签:api 文件处理 its test crt sel https span 入口
原文地址:https://www.cnblogs.com/rongfengliang/p/10203435.html