You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

906 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

思路

以OpenResty做为网关不使用JAVA系的方法构建网关 原因: 1、OpenResty更快性能更好 2、OpenResty更灵活更熟悉 3、网关主要有两个职能是我关心的一个是路由另一个是鉴权 路由无疑Nginx是无敌的而鉴权我不想依赖于OpenResty,而且使用JAVA来让每个微服务模块 来自行实现,各回各家,各找各妈,不把鉴权任务交给网关。

下载地址

https://openresty.org/cn/download.html

Docker 镜像

https://hub.docker.com/r/openresty/openresty

docker run -p 80:80 -d openresty/openresty:1.21.4.1-0-alpine

我采用的镜像是1.21.4.1-0-alpine这个版本的底包较小适合在容器中使用。 需要使用Dockerfile来创建我的网关镜像采用配置好的nginx.conf拷贝进镜像中 并修改nginx.conf使其符合我的需求。