mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 22:04:06 +02:00
@@ -73,7 +73,6 @@
|
|||||||
"WORKERS_PER_CORE": "0.5"
|
"WORKERS_PER_CORE": "0.5"
|
||||||
},
|
},
|
||||||
"image": "ghcr.io/alexbelgium/mealie-{arch}",
|
"image": "ghcr.io/alexbelgium/mealie-{arch}",
|
||||||
"ingress": true,
|
|
||||||
"map": [
|
"map": [
|
||||||
"config:rw",
|
"config:rw",
|
||||||
"share:rw",
|
"share:rw",
|
||||||
@@ -82,7 +81,6 @@
|
|||||||
"name": "Mealie",
|
"name": "Mealie",
|
||||||
"options": {
|
"options": {
|
||||||
"ALLOW_SIGNUP": true,
|
"ALLOW_SIGNUP": true,
|
||||||
"BASE_SUBPATH": "/mealie",
|
|
||||||
"DATA_DIR": "/config/addons_config/mealie_data",
|
"DATA_DIR": "/config/addons_config/mealie_data",
|
||||||
"PGID": 1000,
|
"PGID": 1000,
|
||||||
"PUID": 1000,
|
"PUID": 1000,
|
||||||
@@ -101,7 +99,6 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"ALLOW_SIGNUP": "bool",
|
"ALLOW_SIGNUP": "bool",
|
||||||
"BASE_URL": "str?",
|
"BASE_URL": "str?",
|
||||||
"BASE_SUBPATH": "str?",
|
|
||||||
"DATA_DIR": "str?",
|
"DATA_DIR": "str?",
|
||||||
"PGID": "int",
|
"PGID": "int",
|
||||||
"PUID": "int",
|
"PUID": "int",
|
||||||
@@ -112,6 +109,6 @@
|
|||||||
"slug": "mealie",
|
"slug": "mealie",
|
||||||
"udev": true,
|
"udev": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||||
"version": "v2.0-beta_ingress_test",
|
"version": "v2.0-beta",
|
||||||
"webui": "[PROTO:ssl]://[HOST]:[PORT:9001]"
|
"webui": "[PROTO:ssl]://[HOST]:[PORT:9001]"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ set -e
|
|||||||
|
|
||||||
if bashio::config.true 'ssl'; then
|
if bashio::config.true 'ssl'; then
|
||||||
|
|
||||||
bashio::log.info "Add ssl"
|
|
||||||
|
|
||||||
# Validate ssl
|
# Validate ssl
|
||||||
bashio::config.require.ssl
|
bashio::config.require.ssl
|
||||||
|
|
||||||
@@ -21,12 +19,3 @@ else
|
|||||||
sed -i "/ssl/d" /etc/nginx/servers/ssl.conf
|
sed -i "/ssl/d" /etc/nginx/servers/ssl.conf
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bashio::log.info "Adapting for ingress"
|
|
||||||
|
|
||||||
ingress_port=$(bashio::addon.ingress_port)
|
|
||||||
ingress_interface=$(bashio::addon.ip_address)
|
|
||||||
base_path="$(bashio::config 'BASE_SUBPATH')"
|
|
||||||
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
|
|
||||||
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
|
|
||||||
sed -i "s/%%BASE_SUBPATH%%/${base_path}/g" /etc/nginx/servers/ingress.conf
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
server {
|
|
||||||
listen %%interface%%:%%port%% default_server;
|
|
||||||
include /etc/nginx/includes/server_params.conf;
|
|
||||||
include /etc/nginx/includes/proxy_params.conf;
|
|
||||||
|
|
||||||
# https://emby.media/community/index.php?/topic/104238-playback-error-no-compatible-streams-are-currently-available/&do=findComment&comment=1097946
|
|
||||||
proxy_buffering off;
|
|
||||||
gzip_static off;
|
|
||||||
client_max_body_size 0;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
# Proxy pass
|
|
||||||
proxy_pass http://localhost:9000;
|
|
||||||
|
|
||||||
# Next three lines allow websockets
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
|
|
||||||
# Improve ip handling
|
|
||||||
proxy_hide_header X-Powered-By;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header Accept-Encoding "";
|
|
||||||
proxy_read_timeout 90;
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
|
||||||
add_header 'Referrer-Policy' 'no-referrer';
|
|
||||||
}
|
|
||||||
|
|
||||||
# Correct base_url
|
|
||||||
absolute_redirect off;
|
|
||||||
proxy_redirect / %%ingress_entry%%/;
|
|
||||||
proxy_set_header Accept-Encoding "";
|
|
||||||
sub_filter_once off;
|
|
||||||
sub_filter_types *;
|
|
||||||
sub_filter %%BASE_SUBPATH%%/ %%ingress_entry%%/;
|
|
||||||
sub_filter 'href="/"' 'href="%%ingress_entry%%/"';
|
|
||||||
sub_filter '"\/"' '"%%ingress_entry%%\/"';
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user