This is an automated email from the ASF dual-hosted git repository.

soulbird pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new ef3ba15  chore: cleanup example documentation (#414)
ef3ba15 is described below

commit ef3ba15eaa14713b8663bd93305ec99be1894c24
Author: Jannis Oeltjen <[email protected]>
AuthorDate: Mon Jan 30 02:19:53 2023 +0100

    chore: cleanup example documentation (#414)
    
    - Removed profile flag from docker-compose up/dow command as
    the compose files do not contain any profile
    specific configuration (anymore).
    
    - Changed port for all admin API calls from 9080 to 9180 because the admin 
api is not exposed on 9080.
    
    - Replaced ip addresses inside service upstream config with
    compose service names. CIDR for the bridge created by docker-compose
    might differ between machines, hostnames are fixed.
---
 docs/en/latest/example.md | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/docs/en/latest/example.md b/docs/en/latest/example.md
index 77c61fc..93d83fb 100644
--- a/docs/en/latest/example.md
+++ b/docs/en/latest/example.md
@@ -26,54 +26,54 @@ title: Example
 ### Run
 
 ```
-docker-compose -p docker-apisix up -d
+docker-compose -d
 ```
 
 ### Configure
 
 ```
-curl http://127.0.0.1:9080/apisix/admin/services/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/services/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "upstream": {
         "type": "roundrobin",
         "nodes": {
-            "172.18.5.12:80": 1
+            "web1:80": 1
         }
     }
 }'
 
-curl http://127.0.0.1:9080/apisix/admin/services/2 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/services/2 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "upstream": {
         "type": "roundrobin",
         "nodes": {
-            "172.18.5.13:80": 1
+            "web2:80": 1
         }
     }
 }'
 
-curl http://127.0.0.1:9080/apisix/admin/routes/12 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/routes/12 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "uri": "/*",
     "host": "web1.lvh.me",
     "service_id": "1"
 }'
 
-curl http://127.0.0.1:9080/apisix/admin/routes/22 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/routes/22 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "uri": "/*",
     "host": "web2.lvh.me",
     "service_id": "2"
 }'
 
-curl http://127.0.0.1:9080/apisix/admin/ssl/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d "
+curl http://127.0.0.1:9180/apisix/admin/ssl/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d "
 {
     \"cert\": \"$( cat './mkcert/lvh.me+1.pem')\",
     \"key\": \"$( cat './mkcert/lvh.me+1-key.pem')\",
     \"sni\": \"lvh.me\"
 }"
 
-curl http://127.0.0.1:9080/apisix/admin/ssl/2 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d "
+curl http://127.0.0.1:9180/apisix/admin/ssl/2 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d "
 {
     \"cert\": \"$( cat './mkcert/lvh.me+1.pem')\",
     \"key\": \"$( cat './mkcert/lvh.me+1-key.pem')\",
@@ -99,7 +99,7 @@ curl https://web1.lvh.me:9443/ -v --cacert ./mkcert/rootCA.pem
 ### Clean
 
 ```
-docker-compose -p docker-apisix down
+docker-compose down
 
 sudo rm -rf etcd_data/member
 

Reply via email to