lua-resty-qless-web 是 lua-resty-qless 的web 管理界面以及lua-resty-template 模版引擎开发的,里面实现了一个简单的
路由功能
备注: demo 运行使用docker-compose ,简单修改了官方demo 有问题的部分,后边会添加集成lua-resty-qless 的docker-compose
运行方式

环境准备

  • docker-compose 文件
 
version: "3"
services:
  app:
    build: ./
    ports:
    - "8080:80"
    volumes:
    - "./app/:/opt/app/"
    - "./nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf"
  redis:
    image: redis
    ports:
    - "6379:6379"
 
 
  • nginx 配置
worker_processes 1;
user root;  
events {
    worker_connections 1024;
}
http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    keepalive_timeout 65;
    lua_code_cache off;
    gzip on;
    resolver 127.0.0.11;          
    real_ip_header X-Forwarded-For;
    real_ip_recursive on;
    lua_package_path '/opt/app/lua-resty-qless-web/lib/?.lua;;';
    init_by_lua_block {
      local Qless_Web = require("resty.qless-web")
    }
    server {
        listen 80;
        server_name localhost;
        charset utf-8;
        root html;
        default_type text/html;
       # 配置web 
        location /web {
          default_type text/html;
          location /web/__static {
              internal;
              rewrite ^/web/__static(.*) $1 break;
              root /opt/app/lua-resty-qless-web/static/;
          }
          content_by_lua_block {
              local resty_qless = require "resty.qless"
              local qless, err = resty_qless.new({
                host = "redis",
                port = 6379,
               })
              if not qless then
                 return ngx.say("Qless.new(): ", err)
              end
              local Qless_Web = require("resty.qless-web")
              local web = Qless_Web:new({ client = qless, uri_prefix = "/web" })
              web:run()
          }  
        }
        location / {
           default_type text/html;
           index index.html;
        }
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
            root html;
        }
    }
}
 
  • lua-resty-qless-web 代码
    此代码直接从github clone,使用中需要配置lua 包的位置,在nginx.conf 中
    lua_package_path '/opt/app/lua-resty-qless-web/lib/?.lua;;';

运行&&界面

  • 启动
 
docker-compose up -d
 

参考资料

https://github.com/rongfengliang/lua-resty-qless-web-docker-compose
https://github.com/ledgetech/lua-resty-qless
https://github.com/hamishforbes/lua-resty-qless-web

lua-resty-qless-web UI 界面运行的更多相关文章

  1. HiveServer2的WEB UI界面

    1.hive-site.xml配置如下: <property>    <name>hive.server2.webui.host</name>    <val ...

  2. WEB UI 界面打印PDF

    项目上看到的,感觉很厉害的样子,所以要存档... 说一下思路:画的SF,然后在WDA里调用SF,产生PDF数据流,然后在WDA里用PDF展示出来,UI调用... COMPONENTCONTROLLER ...

  3. azkaban web ui界面出现异常诡异“丑”界面的问题解决(图文详解)

    前期博客 启动azkaban时出现User xml file conf/azkaban-users.xml doesn't exist问题解决(图文详解) 问题详情 [hadoop@master co ...

  4. kafka自带没web ui界面,怎么办?安装个第三方的

    见 基于Web的Kafka管理器工具之Kafka-manager的编译部署详细安装 (支持kafka0.8.0.9和0.10以后版本)(图文详解)(默认端口或任意自定义端口)  

  5. Hbase配置WEB UI界面

    1 找到各个节点下面的Hbase-site.xml文件,添加如下配置 <property> <name>hbase.master.info.port</name> ...

  6. ui自动化,不显示UI界面运行

    from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options ...

  7. windows下运行的linux服务器批量管理工具(带UI界面)

    产生背景: 由于做服务器运维方面的工作,需要一人对近千台LINUX服务器进行统一集中的管理,如同时批量对LINUX服务器执行相关的指令.同时批量对LINUX服务器upload程序包.同时批量对LINU ...

  8. 免费素材:25套免费的 Web UI 设计的界面元素(转)

    Web 元素是任何网站相关项目都需要的,质量和良好设计的元素对于设计师来说就像宝贝一样.如果您正在为您的网站,博客,Web 应用程序或移动应用程序寻找完美设计的网页元素,那么下面这个列表会是你需要的. ...

  9. LTUI v1.1, 一个基于lua的跨平台字符终端UI界面库

    简介 LTUI是一个基于lua的跨平台字符终端UI界面库. 此框架源于xmake中图形化菜单配置的需求,类似linux kernel的menuconf去配置编译参数,因此基于curses和lua实现了 ...

随机推荐

  1. 《Python》正则表达式

    re模块 正则表达式: 应用场景: 1.判断某一个字符串是否符合规则 (注册时:判断手机号,身份证号,邮箱格式是否正确) 2.将符合规则的内容从一个庞大的字符串体系中提取出来 (爬虫,日志分析) 什么 ...

  2. Eclipse界面简介

    下载安装完成后,Eclipse的界面如下: (6)为eclipse的perspective(视图方案)由于安装的是for Java development的eclipse,故视图界面默认 为使用Jav ...

  3. Linux如何从零开始搭建rsync服务器(centOS6)

    Step1:检查rsync是否已经安装 rmp -qa rsync 如果没有安装的话,通过yum install rsync -y   Step2:给rsync服务添加本地用户,用于管理本地目录. u ...

  4. 重载的方式写Python的post请求

    #encoding=utf-8#__author__="Lanyangyang" import unittestimport requestsimport json # This ...

  5. 关于MEX函数的说明

    reference:http://www.mathworks.com/help/matlab/ref/mex.html .MEX文件是一种可在matlab环境中调用的C(或fortran)语言衍生程序 ...

  6. CSS学习笔记-03- 过渡模块之前奏篇 a标签的伪类选择器

    CSS3 2D转换CSS3 3D转换CSS3 过渡CSS3 动画 CSS3 的四大金刚. 想要实现酷炫的视觉效果,上面4个是必须要掌握的.学习之前,先复习一下 视觉盛宴的前菜 :a标签的伪类选择器 铛 ...

  7. mybatis mapper配置文件 CustomerMapper.xml

    Dao @Repositorypublic interface CustomerDAO {    public void create(CustomerModel cm);    public voi ...

  8. E - Mahmoud and Ehab and the bipartiteness CodeForces - 862B (dfs黑白染色)

    Mahmoud and Ehab continue their adventures! As everybody in the evil land knows, Dr. Evil likes bipa ...

  9. 四、使用汇编编写LED裸机驱动

    1. 确定硬件连接 打开OK6410底板电路图,找到LED,可以发现NLEDx为0时LED点亮. 找到LED的控制引脚,发现LED控制引脚通过连接器连到了核心板: 打开核心板电路图,找到对应的连接器中 ...

  10. divide&conquer:find max array

    package max_subarrayy;import java.lang.Math;public class max_subarrayy { private static int[] array; ...