New addon

This commit is contained in:
Alexandre
2024-03-06 09:43:32 +01:00
parent eb2aa4178e
commit dee4e72289
5 changed files with 19 additions and 11 deletions

View File

@@ -1,2 +1 @@
### 1.0 (02-03-2024)
- New addon

View File

@@ -63,6 +63,8 @@
"PUID": "0"
},
"image": "ghcr.io/alexbelgium/codex-{arch}",
"ingress": true,
"ingress_stream": true,
"map": [
"addon_config:rw",
"media:rw",
@@ -99,6 +101,5 @@
"slug": "codex",
"udev": true,
"url": "https://github.com/alexbelgium/hassio-addons",
"version": "1.0",
"webui": "[PROTO:ssl]://[HOST]:[PORT:9810]"
"version": "1.4.3"
}

View File

@@ -26,7 +26,7 @@ declare ingress_interface
declare ingress_port
#declare keyfile
FB_BASEURL=$(bashio::addon.ingress_entry)
FB_BASEURL="$(bashio::addon.ingress_entry)"
export FB_BASEURL
declare ADDON_PROTOCOL=http
@@ -48,10 +48,14 @@ mkdir -p /var/log/nginx && touch /var/log/nginx/error.log
for file in /config/hypercorn.toml $(find /usr -name hypercorn.toml.default); do
if [ -f "$file" ]; then
sed -i "/root_path/d" "$file"
echo "root_path = \"${FB_BASEURL}\"" >> "$file"
sed -i "1a root_path = \"${FB_BASEURL}\"" "$file"
fi
done
# Export CSRF
export CSRF_TRUSTED_ORIGINS="http://localhost,http://192.168.178.23"
export ALLOWED_HOSTS="*"
##############
# LAUNCH APP #
##############
@@ -60,8 +64,8 @@ bashio::log.warning "Default password admin:admin..."
bashio::log.info "Starting..."
# shellcheck disable=SC2086
/./usr/local/bin/codex
/./usr/local/bin/codex & true
bashio::net.wait_for 8080 localhost 900 || true
bashio::net.wait_for 9810 localhost 900 || true
bashio::log.info "Started !"
exec nginx0
exec nginx

View File

@@ -7,7 +7,12 @@ server {
client_max_body_size 0;
location / {
# Allow frames
## proxy_hide_header "Content-Security-Policy";
add_header X-Frame-Options SAMEORIGIN; # Required for ingress frame
add_header Access-Control-Allow-Origin *;
proxy_set_header Accept-Encoding "";
proxy_connect_timeout 30m;
proxy_send_timeout 30m;
proxy_read_timeout 30m;

View File

@@ -1,10 +1,9 @@
{
"github_beta": "true",
"last_update": "16-09-2023",
"paused": true,
"last_update": "06-03-2024",
"repository": "alexbelgium/hassio-addons",
"slug": "codex",
"source": "github",
"upstream_repo": "ajslater/codex",
"upstream_version": "2.25.0"
"upstream_version": "1.4.3"
}