Skip to content

Commit

Permalink
feat: Unified access entrance, only the dashboard port is exposed to … (
Browse files Browse the repository at this point in the history
apache#370)

* feat: Unified access entrance, only the dashboard port is exposed to the outside

* add EOL
  • Loading branch information
gxthrj authored Aug 12, 2020
1 parent dad19b8 commit 4386ac0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions compose/apisix_conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 22 additions & 0 deletions compose/dashboard_conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}

5 changes: 5 additions & 0 deletions compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4386ac0

Please sign in to comment.