nginx experiment

This commit is contained in:
Jan-Henrik 2023-02-10 16:41:52 +01:00
parent d734be7bb5
commit ca5b164d73
3 changed files with 11 additions and 4 deletions

View file

@ -1,7 +1,7 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:9.0.1
FROM ${BUILD_FROM}
RUN apk add --no-cache nginx
RUN apk add --no-cache nginx nginx-mod-http-lua
ADD "https://github.com/jhbruhn/ZBS_Flasher/archive/refs/heads/rssi_fix.tar.gz" /src.tar.gz
RUN mkdir /src && tar xvfz /src.tar.gz -C /src --strip-components=1

View file

@ -1,6 +1,6 @@
---
name: E-Paper Station
version: 1.0.0.43
version: 1.0.0.44
#image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
slug: epaper-station
description: Publish images to E-Paper pricetags

View file

@ -1,6 +1,12 @@
load_module /usr/lib/nginx/modules/ndk_http_module.so;
load_module /usr/lib/nginx/modules/ngx_http_lua_module.so;
pcre_jit on;
daemon off;
error_log /dev/stdout info;
events {
}
@ -20,8 +26,9 @@ http {
root /public;
}
location /input_img {
proxy_pass http://localhost:8080/;
location ^~ /input_img/(?<endpath>.*) {
set_by_lua $endpath 'return string.lower(ngx.var.endpath)'
proxy_pass http://localhost:8080/$endpath;
}
location /ws {