separate server lol

This commit is contained in:
Jan-Henrik 2023-02-07 00:55:46 +01:00
parent e63c3a9bab
commit 14478b7905
4 changed files with 8 additions and 5 deletions

View file

@ -1,6 +1,6 @@
--- ---
name: EPaper Station name: EPaper Station
version: 1.0.0.31 version: 1.0.0.32
#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

View file

@ -1,6 +1,6 @@
daemon off; daemon off;
error_log /dev/stdout info; error_log /dev/stdout info;
user www-data;
events { events {
} }
@ -19,7 +19,7 @@ http {
} }
location /input_img { location /input_img {
root IMG_DIR; proxy_pass http://localhost:8080;
} }
location /ws { location /ws {

View file

@ -0,0 +1,5 @@
#!/usr/bin/with-contenv bashio
IMG_DIR="$(bashio::config 'image_path')"
bashio::log.info "Starting image server..."
cd $IMG_DIR
python -m SimpleHTTPServer 8080

View file

@ -1,6 +1,4 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
IMG_DIR="$(bashio::config 'image_path')"
bashio::log.info "Starting nginx..." bashio::log.info "Starting nginx..."
sed -i "s~IMG_DIR~$IMG_DIR~g" /etc/nginx/nginx.conf
nginx -c /etc/nginx/nginx.conf nginx -c /etc/nginx/nginx.conf
bashio::log.info "nginx running." bashio::log.info "nginx running."