八卦阵 发表于 2024-12-22 19:13:17

apisix docker 安装

git clone https://github.com/apache/apisix-docker.git
cd apisix-docker/example
nano docker-compose
========================主要修改这里===============================
ETCD_ADVERTISE_CLIENT_URLS: "http://192.168.31.160:2379"
===================================================================

docker compose -p docker-apisix up -d

#安装apisix-dashboard
docker pull apache/apisix-dashboard
nano /root/conf.yaml
===================================================================
conf:
listen:
    host: 0.0.0.0   # the address on which the `Manager API` should listen.
                  # The default value is 0.0.0.0, if want to specify, please enable it.
                  # This value accepts IPv4, IPv6, and hostname.
    port: 9000      # The port on which the `Manager API` should listen.

allow_list:       # If we don't set any IP list, then any IP access is allowed by default.
etcd:
    endpoints:      # supports defining multiple etcd host addresses for an etcd cluster
      - 192.168.31.160:2379 # etcd install ip
authentication:
secret:
    zQ5w5jkLDh3jZpywJ3sskrw6Yv633ruq
expire_time: 3600   # jwt token expire time, in second
users:                # yamllint enable rule:comments-indentation
    - username: admin       # dashboard login infomation
      password: admin
===================================================================
cd /
docker run -d --name dashboard -p 9001:9000 -v /root/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml apache/apisix-dashboard  https://i-blog.csdnimg.cn/direct/a56f20ad756f406e81bdef140866b180.png
欣赏器输入:http://192.168.31.160:9001/
https://i-blog.csdnimg.cn/direct/1ae61774e648484daf18809a617f00d9.png
https://i-blog.csdnimg.cn/direct/9523b049e8674544b036494ff27a8f64.png


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: apisix docker 安装