From 396c694d93cc59f60781269a81b053080340e87f Mon Sep 17 00:00:00 2001 From: Timmo Date: Sat, 30 Mar 2019 11:56:22 +0000 Subject: [PATCH] :hammer: Add missing api config --- .../rootfs/etc/cont-init.d/20-secrets.sh | 2 +- home-panel/rootfs/etc/home-panel/default.json | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 home-panel/rootfs/etc/home-panel/default.json diff --git a/home-panel/rootfs/etc/cont-init.d/20-secrets.sh b/home-panel/rootfs/etc/cont-init.d/20-secrets.sh index a833ca0..4227a28 100644 --- a/home-panel/rootfs/etc/cont-init.d/20-secrets.sh +++ b/home-panel/rootfs/etc/cont-init.d/20-secrets.sh @@ -4,4 +4,4 @@ # This updates the internal auth secret for the API # ============================================================================== # shellcheck disable=2094,2016 -bashio::jq /opt/api/config/default.json '.authentication.secret="$(openssl rand -base64 32)"' > /opt/api/config/default.json +bashio::jq /etc/home-panel/default.json '.authentication.secret="$(openssl rand -base64 32)"' > /opt/api/config/default.json diff --git a/home-panel/rootfs/etc/home-panel/default.json b/home-panel/rootfs/etc/home-panel/default.json new file mode 100644 index 0000000..b658ca0 --- /dev/null +++ b/home-panel/rootfs/etc/home-panel/default.json @@ -0,0 +1,37 @@ +{ + "host": "localhost", + "port": 3234, + "public": "../public/", + "paginate": { + "default": 10, + "max": 50 + }, + "authentication": { + "secret": "API_AUTH_SECRET", + "strategies": ["jwt", "local"], + "path": "/authentication", + "service": "users", + "jwt": { + "header": { + "typ": "access" + }, + "audience": "https://timmo.dev/home-panel", + "subject": "anonymous", + "issuer": "feathers", + "algorithm": "HS256", + "expiresIn": "1d" + }, + "local": { + "entity": "user", + "usernameField": "username", + "passwordField": "password" + }, + "cookie": { + "enabled": true, + "name": "feathers-jwt", + "httpOnly": false, + "secure": false + } + }, + "nedb": "/data" +}