aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel <34819524+MarcelCoding@users.noreply.github.com>2021-10-10 15:15:43 +0000
committerGitHub <noreply@github.com>2021-10-10 15:15:43 +0000
commitf75023593341bcc5adc42c8eb3644ba303ed67a0 (patch)
treee9a6b76e2a9ff8fd41049b4084c98d6d66472ab3
parent5d11fd68c6eb62da3aa9d5052653b8c32a7a7c80 (diff)
Added healthcheck url environemnt variable
-rw-r--r--Dockerfile5
-rw-r--r--Dockerfile.arm5
-rw-r--r--Dockerfile.arm645
3 files changed, 9 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index c4acf3c08..1a61790a8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -77,6 +77,8 @@ RUN dotnet publish Jellyfin.Server --disable-parallel --configuration Release --
FROM app
+ENV HEALTHCHECK_URL=http://localhost:8096/health
+
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web
@@ -88,5 +90,4 @@ ENTRYPOINT ["./jellyfin/jellyfin", \
"--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"]
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \
- CMD curl http://localhost:$(grep -oP '(?<=HttpServerPortNumber>)[^<]+' /config/config/network.xml)/$(grep -oP '(?<=BaseUrl>)[^<]+' /config/config/network.xml)health \
- || exit 1
+ CMD curl -L "${HEALTHCHECK_URL}" || exit 1
diff --git a/Dockerfile.arm b/Dockerfile.arm
index f9d249cc1..35287dbbb 100644
--- a/Dockerfile.arm
+++ b/Dockerfile.arm
@@ -68,6 +68,8 @@ RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin"
FROM app
+ENV HEALTHCHECK_URL=http://localhost:8096/health
+
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web
@@ -79,5 +81,4 @@ ENTRYPOINT ["./jellyfin/jellyfin", \
"--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"]
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \
- CMD curl http://localhost:$(grep -oP '(?<=HttpServerPortNumber>)[^<]+' /config/config/network.xml)/$(grep -oP '(?<=BaseUrl>)[^<]+' /config/config/network.xml)health \
- || exit 1
+ CMD curl -L "${HEALTHCHECK_URL}" || exit 1
diff --git a/Dockerfile.arm64 b/Dockerfile.arm64
index cf1a392ea..e120fed1c 100644
--- a/Dockerfile.arm64
+++ b/Dockerfile.arm64
@@ -59,6 +59,8 @@ RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin"
FROM app
+ENV HEALTHCHECK_URL=http://localhost:8096/health
+
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web
@@ -70,5 +72,4 @@ ENTRYPOINT ["./jellyfin/jellyfin", \
"--ffmpeg", "/usr/bin/ffmpeg"]
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \
- CMD curl http://localhost:$(grep -oP '(?<=HttpServerPortNumber>)[^<]+' /config/config/network.xml)/$(grep -oP '(?<=BaseUrl>)[^<]+' /config/config/network.xml)health \
- || exit 1
+ CMD curl -L "${HEALTHCHECK_URL}" || exit 1