Last active
December 21, 2025 10:50
-
-
Save Xornop/adcccad19c8981bd691b6dd63f845c11 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Cleanuparr" | |
| version: "1.0.0" | |
| slug: "cleanuparr" | |
| description: "Cleanuparr Home Assistant Add-on" | |
| arch: | |
| - amd64 | |
| - aarch64 | |
| startup: services | |
| boot: auto | |
| options: | |
| sonarr_url: "http://ip-adress:8989" | |
| sonarr_api_key: "" | |
| radarr_url: "http://ip-adress:7878" | |
| radarr_api_key: "" | |
| dry_run: true | |
| schema: | |
| sonarr_url: str | |
| sonarr_api_key: str | |
| radarr_url: str | |
| radarr_api_key: str | |
| dry_run: bool | |
| ports: | |
| 11011/tcp: 11011 | |
| apparmor: false | |
| privileged: | |
| - SYS_ADMIN | |
| map: | |
| - config:rw | |
| - addon_config:rw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ghcr.io/cleanuparr/cleanuparr:latest | |
| USER root | |
| RUN apt-get update && apt-get install -y jq && rm -rf /var/lib/apt/lists/* | |
| ENTRYPOINT [] | |
| COPY run.sh / | |
| RUN chmod a+x /run.sh | |
| CMD [ "/run.sh" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| echo "[INFO] Starting Cleanuparr Add-on..." | |
| CONFIG_PATH=/data/options.json | |
| export SONARR_URL=$(jq --raw-output '.sonarr_url' $CONFIG_PATH) | |
| export SONARR_API_KEY=$(jq --raw-output '.sonarr_api_key' $CONFIG_PATH) | |
| export RADARR_URL=$(jq --raw-output '.radarr_url' $CONFIG_PATH) | |
| export RADARR_API_KEY=$(jq --raw-output '.radarr_api_key' $CONFIG_PATH) | |
| export DRY_RUN=$(jq --raw-output '.dry_run' $CONFIG_PATH) | |
| export HTTP_PORTS=11011 | |
| echo "[INFO] Setting config directories" | |
| REAL_DATA_DIR="/config/addons_config/local_cleanuparr" | |
| LOG_DIR="$REAL_DATA_DIR/logs" | |
| mkdir -p "$LOG_DIR" | |
| touch "$LOG_DIR/cleanuparr.log" | |
| echo "[INFO] Making sure HA can read the logs" | |
| tail -f "$LOG_DIR/cleanuparr.log" & | |
| export DOTNET_RUNNING_IN_CONTAINER=false | |
| rm -rf /app/config | |
| ln -s "$REAL_DATA_DIR" /app/config | |
| cd /app | |
| exec ./Cleanuparr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment