Apache APISIX Dashboard is a tool that is built to help us easily work with Apache APISIX through the interface instead of the command line. In this tutorial, I will guide you how to install this Apache APISIX Dashboard tool using Docker!
For convenience, I will use the Docker Compose file in the GitHub Repository https://github.com/apache/apisix-docker/blob/master/example/docker-compose.yml with some modifications that I used to install APISIX in the previous tutorial. I will add a new service to the Apache APISIX Dashboard as follows:
1 2 3 4 5 6 7 8 9 10 11 |
dashboard: image: apache/apisix-dashboard restart: always volumes: - ./apisix_dashboard_conf/config.yaml:/usr/local/apisix-dashboard/conf/conf.yaml depends_on: - apisix ports: - "9000:9000/tcp" networks: apisix: |
As you can see, I am using the latest version of the Docker Image of Apache APISIX Dashboard.
I also mount the configuration file of the Apache APISIX Dashboard outside so that I can easily edit the configuration information for the Apache APISIX Dashboard according to my wishes. The necessary configuration information that you need to configure for Apache APISIX Dashboard is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
conf: listen: port: 9000 etcd: endpoints: - etcd:2379 authentication: secert: secert expire_time: 3600 users: - username: admin password: admin |
Apache APISIX Dashboard will read and update Apache APISIX information through etcd. Therefore, we need to configure the information of this etcd server. In the docker-compose.yaml file that I use, the etcd server that Apache APISIX is using runs on port 2379!
We also need to configure the user information used to log in to the Apache APISIX Dashboard. Here, I am configuring this login information as admin/admin.
My Apache APISIX Dashboard will run on port 9000, so you also need to expose it to be able to access it.
Now run the command “docker-compose up” and go to http://localhost:9000/, you will see the following result:
Using the user information we declared above to log in, you will see the result like me, as follows:
So we have successfully installed Apache APISIX Dashboard!