spacewander commented on code in PR #350: URL: https://github.com/apache/apisix-docker/pull/350#discussion_r966560893
########## README.md: ########## @@ -15,40 +15,23 @@ Apache APISIX supports stand-alone mode and also supports the use of etcd databa In stand-alone mode, APISIX uses `apisix.yaml` as the configuration center to store routing, upstream, consumer and other information. After APISIX is started, it will load the `apisix.yaml` file regularly to update the corresponding configuration information. -The following command creates a configuration file for APISIX, and enables stand-alone mode. - -1. Create a APISIX configuration file in the current directory and use this file in the next step. - -``` -$ cat << EOF > $(pwd)/config.yaml -apisix: - enable_admin: false - config_center: yaml -EOF -``` - -2. Start APISIX. +You can start an APISIX container with stand-alone mode by the following command: ``` -$ docker run -d \ - --name apache-apisix \ - -p 9080:9080 \ - -v $(pwd)/config.yaml:/usr/local/apisix/conf/config.yaml \ - apache/apisix +$ docker run -d --name apache-apisix -p 9080:9080 -e APISIX_STAND_ALONE=true apache/apisix ``` -#### Modify stand-alone mode configuration file - -After completing the above steps, you can refer to the following example to write the Route and Plugin configuration to the `apisix.yaml` file. +Add Route and Plugin configuration to the running APISIX container: ``` -$ cat << EOF > apisix.yaml +$ docker exec -i apache-apisix sh -c "cat > /usr/local/apisix/conf/apisix.yaml <<_EOC_ Review Comment: ```suggestion $ docker exec -i apache-apisix sh -c 'cat > /usr/local/apisix/conf/apisix.yaml <<_EOC_ ``` so we don't need to escape the '"' in the example -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
