chore(docker): Introduce RECYCLARR_CREATE_CONFIG env var

If enabled, will invoke `recyclarr create-config` on startup of the
container if the `/config/recyclarr.yml` file does not exist.
pull/151/head
Robert Dailey 1 year ago
parent 360f683718
commit 8155cdd385

@ -22,6 +22,8 @@ changes you need to make.
- Named instances are now supported in configuration YAML.
- New optional setting `repository.git_path` may be used to specify the path to a `git` executable.
If not used, `PATH` will be searched.
- Docker: New `RECYCLARR_CREATE_CONFIG` environment variable which, if set to `true`, will
automatically create `/config/recyclarr.yml` on container start up. Default is `false`.
### Changed

@ -16,7 +16,8 @@ FROM mcr.microsoft.com/dotnet/runtime:7.0-alpine AS final
# Required by environment and/or dotnet
ENV PATH="${PATH}:/app/recyclarr" \
RECYCLARR_APP_DATA=/config \
CRON_SCHEDULE="@daily"
CRON_SCHEDULE="@daily" \
RECYCLARR_CREATE_CONFIG=false
RUN set -ex; \
apk add --no-cache bash tzdata supercronic git; \

@ -1,6 +1,12 @@
#!/usr/bin/env bash
set -e
config=/config/recyclarr.yml
if [[ "$RECYCLARR_CREATE_CONFIG" = true && ! -f "$config" ]]; then
echo "Creating default recyclarr.yml file..."
recyclarr create-config
fi
# If the script has any arguments, invoke the CLI instead
if [ "$#" -gt 0 ]; then
recyclarr "$@"

Loading…
Cancel
Save