Add nginx frontend?
This commit is contained in:
parent
3d0e11159b
commit
d9ee631971
4 changed files with 39 additions and 1 deletions
|
@ -1,12 +1,15 @@
|
||||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:9.0.1
|
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:9.0.1
|
||||||
FROM ${BUILD_FROM}
|
FROM ${BUILD_FROM}
|
||||||
|
|
||||||
|
RUN apk add --no-cache nginx
|
||||||
|
|
||||||
ADD "https://github.com/jhbruhn/ZBS_Flasher/archive/refs/heads/database_path_config.tar.gz" /src.tar.gz
|
ADD "https://github.com/jhbruhn/ZBS_Flasher/archive/refs/heads/database_path_config.tar.gz" /src.tar.gz
|
||||||
RUN mkdir /src && tar xvfz /src.tar.gz -C /src --strip-components=1
|
RUN mkdir /src && tar xvfz /src.tar.gz -C /src --strip-components=1
|
||||||
RUN mv /src/CC2531_station/epaper_station_websocket/ /app
|
RUN mv /src/CC2531_station/epaper_station_websocket/ /app
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN ls /src && pip install -r requirements.txt
|
RUN ls /src && pip install -r requirements.txt
|
||||||
|
RUN mkdir /public && cp /app/online_viewer.html /public/index.html && cp /app/no_img.jpg /public/
|
||||||
|
|
||||||
ADD rootfs /
|
ADD rootfs /
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
name: EPaper Station
|
name: EPaper Station
|
||||||
version: 1.0.0.7
|
version: 1.0.0.8
|
||||||
#image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
|
#image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
|
||||||
slug: epaper-station
|
slug: epaper-station
|
||||||
description: Publish Pictures to EPaper pricetags
|
description: Publish Pictures to EPaper pricetags
|
||||||
uart: true
|
uart: true
|
||||||
|
ingress: true
|
||||||
|
ingress_port: 4242
|
||||||
arch:
|
arch:
|
||||||
- amd64
|
- amd64
|
||||||
- armv7
|
- armv7
|
||||||
|
|
29
epaper-station/rootfs/etc/nginx/nginx.conf
Normal file
29
epaper-station/rootfs/etc/nginx/nginx.conf
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
daemon off;
|
||||||
|
|
||||||
|
events {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
server {
|
||||||
|
server_name localhost;
|
||||||
|
listen 0.0.0.0:4242;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /public;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /ws {
|
||||||
|
proxy_pass http://localhost:8000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
4
epaper-station/rootfs/etc/services.d/nginx/run
Normal file
4
epaper-station/rootfs/etc/services.d/nginx/run
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bin/with-contenv bashio
|
||||||
|
bashio::log.info "Starting nginx..."
|
||||||
|
nginx -g "daemon off;" -c /etc/nginx/nginx.conf
|
||||||
|
bashio::log.info "nginx running."
|
Loading…
Reference in a new issue