1 Star 0 Fork 1K

xucoco/shenyu

forked from Apache ShenYu/shenyu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

ShenYu Distribution

The shenyu-dist module is used to build packages and releases.

Quickstart

Then you will see the dist directory in root directory.

How to run docker

  • build image and startup docker container

docker build

cd shenyu 
mvn clean package -Prelease,docker -Dmaven.javadoc.skip=true -Dmaven.test.skip=true

If build success, run docker images and you will see like this.

REPOSITORY                TAG                    IMAGE ID            CREATED             SIZE
apache/shenyu-bootstrap   2.2.1                  0002944cca64        About an hour ago   200MB
apache/shenyu-admin       2.2.1                  1a4b73d6dd6d        About an hour ago   215MB

run docker

docker network create shenyu
docker run -d -p 9095:9095 --net shenyu apache/shenyu-admin:2.2.1
docker run -d -p 9195:9195 --net shenyu apache/shenyu-bootstrap:2.2.1

If you want to override environment variables, you can do like this.

docker run -e "SPRING_PROFILES_ACTIVE=mysql" -e "spring.datasource.url=jdbc:mysql://192.168.1.9:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false" -e "spring.datasource.password=123456" -d -p 9095:9095 --net shenyu apache/shenyu-admin:2.2.1

Another way, bind volume and mounts

Put your application.yml in xxx directory, then run like this.

docker run -v D:\tmp\conf:/opt/shenyu-admin/conf/ -d -p 9095:9095 --net shenyu apache/shenyu-admin:2.2.1

Note: The Docker environment uses an H2 database by default.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/xucoco/shenyu.git
git@gitee.com:xucoco/shenyu.git
xucoco
shenyu
shenyu
master

搜索帮助