This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-apisix-docker.git
The following commit(s) were added to refs/heads/master by this push: new a07fce2 doc: change `config.sh` to `gen-config-yaml.sh` (#68) a07fce2 is described below commit a07fce2bb1d266d5d3ea3c77300077ca005e1a45 Author: kv <gxt...@163.com> AuthorDate: Tue Jul 28 12:24:22 2020 +0800 doc: change `config.sh` to `gen-config-yaml.sh` (#68) Fix #67 --- example/README.md | 4 ++-- example/config.sh | 0 example/gen-config-yaml.sh | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/example/README.md b/example/README.md index 852af22..cdd8d92 100644 --- a/example/README.md +++ b/example/README.md @@ -1,8 +1,8 @@ ### Run ``` -$ chmod +x config.sh -$ sh config.sh +$ chmod +x gen-config-yaml.sh +$ sh gen-config-yaml.sh $ docker-compose -p docker-apisix up -d ``` diff --git a/example/config.sh b/example/config.sh deleted file mode 100644 index e69de29..0000000 diff --git a/example/gen-config-yaml.sh b/example/gen-config-yaml.sh new file mode 100644 index 0000000..6bdc436 --- /dev/null +++ b/example/gen-config-yaml.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +export etcd_url='http://172.18.5.10:2379' + +wget https://raw.githubusercontent.com/apache/incubator-apisix/master/conf/config.yaml + +sed -i -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml + +sed -i -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml + +mv config.yaml ./apisix_conf/config.yaml \ No newline at end of file