Browse Source

uwsgi-cgi: introduce emperor mode as default uwsgi installation

- Use uwsgi in emperor mode by default

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
lilik-openwrt-22.03
Ansuel Smith 5 years ago
parent
commit
e8a391e9c7
No known key found for this signature in database GPG Key ID: AC001D09ADBFEAD7
4 changed files with 22 additions and 33 deletions
  1. +9
    -3
      net/uwsgi-cgi/Makefile
  2. +0
    -27
      net/uwsgi-cgi/files-luci-support/uwsgi.conf
  3. +10
    -0
      net/uwsgi-cgi/files/emperor.ini
  4. +3
    -3
      net/uwsgi-cgi/files/uwsgi.init

+ 9
- 3
net/uwsgi-cgi/Makefile View File

@ -51,12 +51,18 @@ endef
define Package/uwsgi-cgi/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uwsgi $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/uwsgi.init $(1)/etc/init.d/uwsgi
$(INSTALL_DIR) $(1)/etc/uwsgi
$(INSTALL_DATA) ./files/emperor.ini $(1)/etc/uwsgi/emperor.ini
$(INSTALL_DIR) $(1)/etc/uwsgi/vassals
endef
define Package/uwsgi-cgi-luci-support/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files-luci-support/uwsgi.init $(1)/etc/init.d/uwsgi
$(INSTALL_BIN) ./files-luci-support/uwsgi.conf $(1)/etc/uwsgi.conf
endef
$(eval $(call BuildPackage,uwsgi-cgi))


+ 0
- 27
net/uwsgi-cgi/files-luci-support/uwsgi.conf View File

@ -1,27 +0,0 @@
[uwsgi]
strict = true
socket = /var/run/uwsgi.sock
cgi-mode = true
cgi = /www/
chdir = /usr/lib/lua/luci/
master = true
buffer-size = 10000
reload-mercy = 8
max-requests = 2000
limit-as = 200
reload-on-as = 256
reload-on-rss = 192
no-orphans = true
vacuum = true
enable-threads = true
post-buffering = 8192
socket-timeout = 120
thunder-lock = true
logger = syslog:uwsgi
disable-logging = true
log-format = %(addr) %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs
pidfile = /var/run/uwsgi.pid
die-on-term = true
threads = 3
processes = 3
chmod-socket = 666

+ 10
- 0
net/uwsgi-cgi/files/emperor.ini View File

@ -0,0 +1,10 @@
[uwsgi]
strict = true
pidfile = /var/run/uwsgi.pid
emperor = /etc/uwsgi/vassals/*.ini
logger = syslog:uwsgi-emperor
vacuum = true
emperor-on-demand-directory = /var/run/
emperor-required-heartbeat = 99
vassal-set = die-on-idle=true
#disable-logging = true

net/uwsgi-cgi/files-luci-support/uwsgi.init → net/uwsgi-cgi/files/uwsgi.init View File


Loading…
Cancel
Save