This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 4386ac0 feat: Unified access entrance, only the dashboard port is
exposed to … (#370)
4386ac0 is described below
commit 4386ac083f402ab0664c62519ae90c0f8af6186a
Author: kv <[email protected]>
AuthorDate: Wed Aug 12 20:55:10 2020 +0800
feat: Unified access entrance, only the dashboard port is exposed to …
(#370)
* feat: Unified access entrance, only the dashboard port is exposed to the
outside
* add EOL
---
compose/apisix_conf/config.yaml | 1 +
compose/dashboard_conf/nginx.conf | 22 ++++++++++++++++++++++
compose/docker-compose.yml | 5 +++++
3 files changed, 28 insertions(+)
diff --git a/compose/apisix_conf/config.yaml b/compose/apisix_conf/config.yaml
index 014cfc4..3fc9efd 100644
--- a/compose/apisix_conf/config.yaml
+++ b/compose/apisix_conf/config.yaml
@@ -100,6 +100,7 @@ nginx_config: # config for render the
template to genarate n
error_log: "logs/error.log"
error_log_level: "warn" # warn,error
worker_rlimit_nofile: 20480 # the number of files a worker process can
open, should be larger than worker_connections
+ worker_shutdown_timeout: 240s
event:
worker_connections: 10620
http:
diff --git a/compose/dashboard_conf/nginx.conf
b/compose/dashboard_conf/nginx.conf
new file mode 100644
index 0000000..3735dd8
--- /dev/null
+++ b/compose/dashboard_conf/nginx.conf
@@ -0,0 +1,22 @@
+server {
+ listen 80;
+ # gzip config
+ gzip on;
+ gzip_min_length 1k;
+ gzip_comp_level 9;
+ gzip_types text/plain text/css text/javascript application/json
application/javascript application/x-javascript application/xml;
+ gzip_vary on;
+ gzip_disable "MSIE [1-6]\.";
+
+ root /usr/share/nginx/html;
+ include /etc/nginx/mime.types;
+
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+
+ location /apisix/admin {
+ proxy_pass http://manager:8080/apisix/admin;
+ }
+}
+
diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml
index 9e0707e..78d3914 100644
--- a/compose/docker-compose.yml
+++ b/compose/docker-compose.yml
@@ -135,6 +135,11 @@ services:
restart: always
ports:
- "80:80/tcp"
+ volumes:
+ - "./dashboard_conf/nginx.conf:/etc/nginx/conf.d/default.conf"
+ networks:
+ apisix-dashboard:
+ ipv4_address: 192.17.5.18
networks:
apisix-dashboard: