Add Ingress Support (#1)

* Add ingress support

* Development framework

* Add ARCH arg for correct s6 version

* Support new ARCH arg for correct s6 overlay version

* Add PR trigger to workflow

* Add image again

Co-authored-by: Matt White <matt.white@microsoft.com>
This commit is contained in:
Thomas Moore
2021-01-08 14:24:13 +00:00
committed by GitHub
co-authored by Matt White
parent 0a82b9eba8
commit d544873055
15 changed files with 319 additions and 25 deletions
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
s6-svscanctl -t /var/run/s6/services
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/with-contenv sh
ingress_entry=$(curl -X GET \
-H "Authorization: Bearer ${SUPERVISOR_TOKEN}" \
-H "Content-Type: application/json" \
-s http://supervisor/addons/self/info | \
jq -r '.data.ingress_entry')
sed -i "s^url: \[^url: \[path: \"${ingress_entry}\", ^" /opt/app/releases/*/releases.exs
cd /opt/app
exec /ha-bootstrap.sh bin/teslamate start