lua-resty-qless-web UI 界面运行
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
- 效果
访问地址 http://localhost:8080/web/
参考资料
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 界面运行的更多相关文章
- HiveServer2的WEB UI界面
1.hive-site.xml配置如下: <property> <name>hive.server2.webui.host</name> <val ...
- WEB UI 界面打印PDF
项目上看到的,感觉很厉害的样子,所以要存档... 说一下思路:画的SF,然后在WDA里调用SF,产生PDF数据流,然后在WDA里用PDF展示出来,UI调用... COMPONENTCONTROLLER ...
- azkaban web ui界面出现异常诡异“丑”界面的问题解决(图文详解)
前期博客 启动azkaban时出现User xml file conf/azkaban-users.xml doesn't exist问题解决(图文详解) 问题详情 [hadoop@master co ...
- kafka自带没web ui界面,怎么办?安装个第三方的
见 基于Web的Kafka管理器工具之Kafka-manager的编译部署详细安装 (支持kafka0.8.0.9和0.10以后版本)(图文详解)(默认端口或任意自定义端口)
- Hbase配置WEB UI界面
1 找到各个节点下面的Hbase-site.xml文件,添加如下配置 <property> <name>hbase.master.info.port</name> ...
- ui自动化,不显示UI界面运行
from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options ...
- windows下运行的linux服务器批量管理工具(带UI界面)
产生背景: 由于做服务器运维方面的工作,需要一人对近千台LINUX服务器进行统一集中的管理,如同时批量对LINUX服务器执行相关的指令.同时批量对LINUX服务器upload程序包.同时批量对LINU ...
- 免费素材:25套免费的 Web UI 设计的界面元素(转)
Web 元素是任何网站相关项目都需要的,质量和良好设计的元素对于设计师来说就像宝贝一样.如果您正在为您的网站,博客,Web 应用程序或移动应用程序寻找完美设计的网页元素,那么下面这个列表会是你需要的. ...
- LTUI v1.1, 一个基于lua的跨平台字符终端UI界面库
简介 LTUI是一个基于lua的跨平台字符终端UI界面库. 此框架源于xmake中图形化菜单配置的需求,类似linux kernel的menuconf去配置编译参数,因此基于curses和lua实现了 ...
随机推荐
- [leetcode121]股票买卖 Best Time to Buy and Sell Kadane算法
[题目] Say you have an array for which the ith element is the price of a given stock on day i. If you ...
- Python Select模型(程序流程)(转)
缘由 之前写socket的CS模型代码,都是利用最原始的多线程方式.服务端是主线程,接到客户端的连接请求就从线程池中获取一个线程去处理整个socket连接的所有操作,虽然在连接数较短的情况下没有什么影 ...
- 下载python中package的简便方法
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx
- translclude
.transclude:true 启用transclude,启用以后,有两个地方会发生变化: ①.使用指令的元素内部的所有内容都会被保存起来.不妨先把这一段内容称为一坨. 比如指令元素是这样的: &l ...
- Configuring Ubuntu for deep learning with Python in Ubuntu16.04
博主最近浏览到一个网站PyImageSearch,看到里面的项目还不错,就顺手配置一下环境,试着去跑下里面的模型. 首先,需要配置好需要运行模型的环境,其实主要的步骤分为以下三步: 1. 安装Ubun ...
- <Hadoop重装><centos><NameNode失效>
Overview 记一次真真切切的NameNode单点故障. 学校机房着火之后,刀片机上的四台服务器,唯独就NameNode彻底宕掉了,去机房看了下硬盘都坏了.. 所以只能换一个master咯.基本上 ...
- kbmMW SmartService控制返回类型
- hive中left join、left outer join和left semi join的区别
先说结论,再举例子. hive中,left join与left outer join等价. left semi join与left outer join的区别:left semi join相当 ...
- “Cannot make a static reference to the non-static method”处理方法
报错原文:Cannot make a static reference to the non-static method maxArea(Shape[]) from the type ShapeTes ...
- ChainingHash
public class ChainingHash<Key,Value>{ private int N; private int M; private doublylinked<Ke ...