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
image: plugins/docker
settings:
repo: registry.kucharczyk.tech/container
repo: registry.kucharczyk.tech/radarr
tags: latest
trigger:
event:

View File

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

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