Import changes from GitHub
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Lukáš Kucharczyk 2021-07-25 21:39:25 +02:00
parent 4acfd10102
commit 193779068e
No known key found for this signature in database
GPG Key ID: 65524498C0196B64
4 changed files with 26 additions and 7 deletions

View File

@ -7,7 +7,7 @@ steps:
- name: build - name: build
image: plugins/docker image: plugins/docker
settings: settings:
repo: registry.kucharczyk.tech/container repo: registry.kucharczyk.tech/radarr
tags: latest tags: latest
trigger: trigger:
event: event:

View File

@ -1,5 +1,4 @@
FROM scratch FROM linuxserver/radarr:nightly
RUN echo "hello world" LABEL maintainer="lukas@kucharczyk.xyz"
COPY example.txt / COPY healthcheck.sh /
ENV VAR=1 HEALTHCHECK CMD /healthcheck.sh
CMD ["sleep", "infinity"]

View File

@ -1,2 +1,12 @@
# container # Radarr With Healthcheck
Simple healthcheck that polls the official Radarr v3 API to see if there are
any problems. Based on the `linuxserver/radarr:preview` image.
## Environmental Variables
Both MUST be defined otherwise the healthcheck will fail.
- `RADARR_URL` - The URL to your Radarr container. Either an IP address with
port number or URL if you're using a reverse proxy.
- `APIKEY` - Can be found in Settings -> General.

10
healthcheck.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
curl ${RADARR_URL}/api/v3/health?apiKey=${APIKEY} 2>&1 | grep -q error
if [ "$?" -eq 1 ]
then
echo "No errors."
exit 0
else
echo "Errors occurred. Check the web interface."
exit 1
fi