Adds restarts support to docker container

This commit is contained in:
Alexey Khit
2022-08-21 09:27:02 +03:00
parent b7f4c63517
commit 07def5ba04
2 changed files with 17 additions and 1 deletions
+4 -1
View File
@@ -16,4 +16,7 @@ RUN if [ "${BUILD_ARCH}" = "aarch64" ]; then BUILD_ARCH="arm64"; \
&& curl $(curl -s "https://raw.githubusercontent.com/ngrok/docker-ngrok/main/releases.json" | jq -r ".${BUILD_ARCH}.url") -o ngrok.zip \
&& unzip ngrok
CMD [ "/app/go2rtc", "-config", "/config/go2rtc.yaml" ]
COPY run.sh /
RUN chmod a+x /run.sh
CMD [ "/run.sh" ]
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bashio
set +e
while true; do
if [ -x /config/go2rtc ]; then
/config/go2rtc -config /config/go2rtc.yaml
else
/app/go2rtc -config /config/go2rtc.yaml
fi
sleep 5
done