Ceryx 介绍
Ceryx 是基于 NGINX OpenResty 的动态反向代理,带有一个
API。
代理
Ceryx 使用 NGINX OpenResty 为了基于请求主机进行路由请求。这个路由是使用 NGINX Lua 模块制作的,可以通过查询一个 Redis
后端获取结果。
API
Ceryx 包含一个简单 Flask Web 服务,支持路由的 REST 操作。用户可以使用一个 REST 客户端动态创建,更新和删除路由。
配置
Ceryx 支持使用环境变量配置,支持的配置选项:
CERYX_NAME: sets the API service name - defaults to ceryx
CERYX_DEBUG: enables debuging on the API service - defaults to true
CERYX_API_HOST: sets the host that the API will bind to - defaults to 127.0.0.1
CERYX_API_PORT: sets the port that the API will listen - defaults to 5555
CERYX_SERVER_NAME: the URL of the API service - default to None
CERYX_SECRET_KEY: the path of the secret key to use - defaults to None
CERYX_REDIS_HOST: the redis host to connect to - defaults to 127.0.0.1
CERYX_REDIS_PORT: the redis port to connect to - defaults to 6379
CERYX_REDIS_PREFIX: the redis prefix to use in keys - defaults to ceryx
示例:
# production.yml proxy: extends: file: base.yml service: proxy ports: - 80:80 environment: - CERYX_REDIS_HOST=my.redis.host api: extends: file: base.yml service: api ports: - 5555:5555 environment: - CERYX_REDIS_HOST=my.redis.host - CERYX_DEBUG=false - CERYX_SECRET_KEY=/path/to/production/secret
Ceryx 官网
https://github.com/sourcelair/ceryx
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。