Skip to content

Commit

Permalink
feat: arr theme env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa committed Aug 6, 2023
1 parent 6f2dcbc commit bfaacbe
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/lidarr/config.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
<SslCertPassword></SslCertPassword>
<UpdateMechanism>BuiltIn</UpdateMechanism>
<AnalyticsEnabled>${LIDARR__ANALYTICS_ENABLED}</AnalyticsEnabled>
<Theme>${LIDARR__THEME:-auto}</Theme>
</Config>
2 changes: 2 additions & 0 deletions apps/lidarr/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [[ -f /config/config.xml ]]; then
current_postgres_host="$(xmlstarlet sel -t -v "//PostgresHost" -nl /config/config.xml)"
current_postgres_main_db="$(xmlstarlet sel -t -v "//PostgresMainDb" -nl /config/config.xml)"
current_postgres_log_db="$(xmlstarlet sel -t -v "//PostgresLogDb" -nl /config/config.xml)"
current_theme="$(xmlstarlet sel -t -v "//Theme" -nl /config/config.xml)"
fi

# Update config.xml with environment variables
Expand All @@ -39,6 +40,7 @@ envsubst < /app/config.xml.tmpl > /config/config.xml
[[ -z "${LIDARR__POSTGRES_HOST}" && -n "${current_postgres_host}" ]] && xmlstarlet edit --inplace --update //PostgresHost -v "${current_postgres_host}" /config/config.xml
[[ -z "${LIDARR__POSTGRES_MAIN_DB}" && -n "${current_postgres_main_db}" ]] && xmlstarlet edit --inplace --update //PostgresMainDb -v "${current_postgres_main_db}" /config/config.xml
[[ -z "${LIDARR__POSTGRES_LOG_DB}" && -n "${current_postgres_log_db}" ]] && xmlstarlet edit --inplace --update //PostgresLogDb -v "${current_postgres_log_db}" /config/config.xml
[[ -z "${LIDARR__THEME}" && -n "${current_theme}" ]] && xmlstarlet edit --inplace --update //Theme -v "${current_theme}" /config/config.xml

# BindAddress, LaunchBrowser, Port, EnableSsl, SslPort, SslCertPath, SslCertPassword, UpdateMechanism
# have been omited because their configuration is not really needed in a container environment
Expand Down
1 change: 1 addition & 0 deletions apps/prowlarr/config.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
<SslCertPassword></SslCertPassword>
<UpdateMechanism>BuiltIn</UpdateMechanism>
<AnalyticsEnabled>${PROWLARR__ANALYTICS_ENABLED}</AnalyticsEnabled>
<Theme>${PROWLARR__THEME:-auto}</Theme>
</Config>
2 changes: 2 additions & 0 deletions apps/prowlarr/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [[ -f /config/config.xml ]]; then
current_postgres_host="$(xmlstarlet sel -t -v "//PostgresHost" -nl /config/config.xml)"
current_postgres_main_db="$(xmlstarlet sel -t -v "//PostgresMainDb" -nl /config/config.xml)"
current_postgres_log_db="$(xmlstarlet sel -t -v "//PostgresLogDb" -nl /config/config.xml)"
current_theme="$(xmlstarlet sel -t -v "//Theme" -nl /config/config.xml)"
fi

# Update config.xml with environment variables
Expand All @@ -39,6 +40,7 @@ envsubst < /app/config.xml.tmpl > /config/config.xml
[[ -z "${PROWLARR__POSTGRES_HOST}" && -n "${current_postgres_host}" ]] && xmlstarlet edit --inplace --update //PostgresHost -v "${current_postgres_host}" /config/config.xml
[[ -z "${PROWLARR__POSTGRES_MAIN_DB}" && -n "${current_postgres_main_db}" ]] && xmlstarlet edit --inplace --update //PostgresMainDb -v "${current_postgres_main_db}" /config/config.xml
[[ -z "${PROWLARR__POSTGRES_LOG_DB}" && -n "${current_postgres_log_db}" ]] && xmlstarlet edit --inplace --update //PostgresLogDb -v "${current_postgres_log_db}" /config/config.xml
[[ -z "${PROWLARR__THEME}" && -n "${current_theme}" ]] && xmlstarlet edit --inplace --update //Theme -v "${current_theme}" /config/config.xml

# BindAddress, LaunchBrowser, Port, EnableSsl, SslPort, SslCertPath, SslCertPassword, UpdateMechanism
# have been omited because their configuration is not really needed in a container environment
Expand Down
1 change: 1 addition & 0 deletions apps/radarr/config.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
<SslCertPassword></SslCertPassword>
<UpdateMechanism>BuiltIn</UpdateMechanism>
<AnalyticsEnabled>${RADARR__ANALYTICS_ENABLED}</AnalyticsEnabled>
<Theme>${RADARR__THEME:-auto}</Theme>
</Config>
2 changes: 2 additions & 0 deletions apps/radarr/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [[ -f /config/config.xml ]]; then
current_postgres_host="$(xmlstarlet sel -t -v "//PostgresHost" -nl /config/config.xml)"
current_postgres_main_db="$(xmlstarlet sel -t -v "//PostgresMainDb" -nl /config/config.xml)"
current_postgres_log_db="$(xmlstarlet sel -t -v "//PostgresLogDb" -nl /config/config.xml)"
current_theme="$(xmlstarlet sel -t -v "//Theme" -nl /config/config.xml)"
fi

# Update config.xml with environment variables
Expand All @@ -39,6 +40,7 @@ envsubst < /app/config.xml.tmpl > /config/config.xml
[[ -z "${RADARR__POSTGRES_HOST}" && -n "${current_postgres_host}" ]] && xmlstarlet edit --inplace --update //PostgresHost -v "${current_postgres_host}" /config/config.xml
[[ -z "${RADARR__POSTGRES_MAIN_DB}" && -n "${current_postgres_main_db}" ]] && xmlstarlet edit --inplace --update //PostgresMainDb -v "${current_postgres_main_db}" /config/config.xml
[[ -z "${RADARR__POSTGRES_LOG_DB}" && -n "${current_postgres_log_db}" ]] && xmlstarlet edit --inplace --update //PostgresLogDb -v "${current_postgres_log_db}" /config/config.xml
[[ -z "${RADARR__THEME}" && -n "${current_theme}" ]] && xmlstarlet edit --inplace --update //Theme -v "${current_theme}" /config/config.xml

# BindAddress, LaunchBrowser, Port, EnableSsl, SslPort, SslCertPath, SslCertPassword, UpdateMechanism
# have been omited because their configuration is not really needed in a container environment
Expand Down
1 change: 1 addition & 0 deletions apps/radarr/zeus/config.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
<SslPort>6969</SslPort>
<UpdateMechanism>BuiltIn</UpdateMechanism>
<UrlBase>${RADARR__URL_BASE}</UrlBase>
<Theme>${RADARR__THEME:-auto}</Theme>
</Config>
2 changes: 2 additions & 0 deletions apps/radarr/zeus/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [[ -f /config/config.xml ]]; then
current_postgres_port="$(xmlstarlet sel -t -v "//PostgresPort" -nl /config/config.xml)"
current_postgres_user="$(xmlstarlet sel -t -v "//PostgresUser" -nl /config/config.xml)"
current_url_base="$(xmlstarlet sel -t -v "//UrlBase" -nl /config/config.xml)"
current_theme="$(xmlstarlet sel -t -v "//Theme" -nl /config/config.xml)"
fi

# Update config.xml with environment variables
Expand All @@ -39,6 +40,7 @@ envsubst < /app/config.xml.tmpl > /config/config.xml
[[ -z "${RADARR__POSTGRES_PORT}" && -n "${current_postgres_port}" ]] && xmlstarlet edit --inplace --update //PostgresPort -v "${current_postgres_port}" /config/config.xml
[[ -z "${RADARR__POSTGRES_USER}" && -n "${current_postgres_user}" ]] && xmlstarlet edit --inplace --update //PostgresUser -v "${current_postgres_user}" /config/config.xml
[[ -z "${RADARR__URL_BASE}" && -n "${current_url_base}" ]] && xmlstarlet edit --inplace --update //UrlBase -v "${current_url_base}" /config/config.xml
[[ -z "${RADARR__THEME}" && -n "${current_theme}" ]] && xmlstarlet edit --inplace --update //Theme -v "${current_theme}" /config/config.xml

# BindAddress, LaunchBrowser, Port, EnableSsl, SslPort, SslCertPath, SslCertPassword, UpdateMechanism
# have been omited because their configuration is not really needed in a container environment
Expand Down
1 change: 1 addition & 0 deletions apps/readarr/config.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
<SslCertPassword></SslCertPassword>
<UpdateMechanism>BuiltIn</UpdateMechanism>
<AnalyticsEnabled>${READARR__ANALYTICS_ENABLED}</AnalyticsEnabled>
<Theme>${READARR__THEME:-auto}</Theme>
</Config>
2 changes: 2 additions & 0 deletions apps/readarr/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if [[ -f /config/config.xml ]]; then
current_postgres_main_db="$(xmlstarlet sel -t -v "//PostgresMainDb" -nl /config/config.xml)"
current_postgres_log_db="$(xmlstarlet sel -t -v "//PostgresLogDb" -nl /config/config.xml)"
current_postgres_cache_db="$(xmlstarlet sel -t -v "//PostgresCacheDb" -nl /config/config.xml)"
current_theme="$(xmlstarlet sel -t -v "//Theme" -nl /config/config.xml)"
fi

# Update config.xml with environment variables
Expand All @@ -41,6 +42,7 @@ envsubst < /app/config.xml.tmpl > /config/config.xml
[[ -z "${READARR__POSTGRES_MAIN_DB}" && -n "${current_postgres_main_db}" ]] && xmlstarlet edit --inplace --update //PostgresMainDb -v "${current_postgres_main_db}" /config/config.xml
[[ -z "${READARR__POSTGRES_LOG_DB}" && -n "${current_postgres_log_db}" ]] && xmlstarlet edit --inplace --update //PostgresLogDb -v "${current_postgres_log_db}" /config/config.xml
[[ -z "${READARR__POSTGRES_CACHE_DB}" && -n "${current_postgres_cache_db}" ]] && xmlstarlet edit --inplace --update //PostgresCacheDb -v "${current_postgres_cache_db}" /config/config.xml
[[ -z "${READARR__THEME}" && -n "${current_theme}" ]] && xmlstarlet edit --inplace --update //Theme -v "${current_theme}" /config/config.xml

# BindAddress, LaunchBrowser, Port, EnableSsl, SslPort, SslCertPath, SslCertPassword, UpdateMechanism
# have been omited because their configuration is not really needed in a container environment
Expand Down
1 change: 1 addition & 0 deletions apps/sonarr/config.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
<SslCertPassword></SslCertPassword>
<UpdateMechanism>BuiltIn</UpdateMechanism>
<AnalyticsEnabled>${SONARR__ANALYTICS_ENABLED}</AnalyticsEnabled>
<Theme>${SONARR__THEME:-auto}</Theme>
</Config>
1 change: 1 addition & 0 deletions apps/sonarr/develop/config.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
<SslCertPassword></SslCertPassword>
<UpdateMechanism>BuiltIn</UpdateMechanism>
<AnalyticsEnabled>${SONARR__ANALYTICS_ENABLED}</AnalyticsEnabled>
<Theme>${SONARR__THEME:-auto}</Theme>
</Config>
2 changes: 2 additions & 0 deletions apps/sonarr/develop/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [[ -f /config/config.xml ]]; then
current_postgres_host="$(xmlstarlet sel -t -v "//PostgresHost" -nl /config/config.xml)"
current_postgres_main_db="$(xmlstarlet sel -t -v "//PostgresMainDb" -nl /config/config.xml)"
current_postgres_log_db="$(xmlstarlet sel -t -v "//PostgresLogDb" -nl /config/config.xml)"
current_theme="$(xmlstarlet sel -t -v "//Theme" -nl /config/config.xml)"
fi

# Update config.xml with environment variables
Expand All @@ -39,6 +40,7 @@ envsubst < /app/config.xml.tmpl > /config/config.xml
[[ -z "${SONARR__POSTGRES_HOST}" && -n "${current_postgres_host}" ]] && xmlstarlet edit --inplace --update //PostgresHost -v "${current_postgres_host}" /config/config.xml
[[ -z "${SONARR__POSTGRES_MAIN_DB}" && -n "${current_postgres_main_db}" ]] && xmlstarlet edit --inplace --update //PostgresMainDb -v "${current_postgres_main_db}" /config/config.xml
[[ -z "${SONARR__POSTGRES_LOG_DB}" && -n "${current_postgres_log_db}" ]] && xmlstarlet edit --inplace --update //PostgresLogDb -v "${current_postgres_log_db}" /config/config.xml
[[ -z "${SONARR__THEME}" && -n "${current_theme}" ]] && xmlstarlet edit --inplace --update //Theme -v "${current_theme}" /config/config.xml

# BindAddress, LaunchBrowser, Port, EnableSsl, SslPort, SslCertPath, SslCertPassword, UpdateMechanism
# have been omited because their configuration is not really needed in a container environment
Expand Down
2 changes: 2 additions & 0 deletions apps/sonarr/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [[ -f /config/config.xml ]]; then
current_postgres_host="$(xmlstarlet sel -t -v "//PostgresHost" -nl /config/config.xml)"
current_postgres_main_db="$(xmlstarlet sel -t -v "//PostgresMainDb" -nl /config/config.xml)"
current_postgres_log_db="$(xmlstarlet sel -t -v "//PostgresLogDb" -nl /config/config.xml)"
current_theme="$(xmlstarlet sel -t -v "//Theme" -nl /config/config.xml)"
fi

# Update config.xml with environment variables
Expand All @@ -39,6 +40,7 @@ envsubst < /app/config.xml.tmpl > /config/config.xml
[[ -z "${SONARR__POSTGRES_HOST}" && -n "${current_postgres_host}" ]] && xmlstarlet edit --inplace --update //PostgresHost -v "${current_postgres_host}" /config/config.xml
[[ -z "${SONARR__POSTGRES_MAIN_DB}" && -n "${current_postgres_main_db}" ]] && xmlstarlet edit --inplace --update //PostgresMainDb -v "${current_postgres_main_db}" /config/config.xml
[[ -z "${SONARR__POSTGRES_LOG_DB}" && -n "${current_postgres_log_db}" ]] && xmlstarlet edit --inplace --update //PostgresLogDb -v "${current_postgres_log_db}" /config/config.xml
[[ -z "${SONARR__THEME}" && -n "${current_theme}" ]] && xmlstarlet edit --inplace --update //Theme -v "${current_theme}" /config/config.xml

# BindAddress, LaunchBrowser, Port, EnableSsl, SslPort, SslCertPath, SslCertPassword, UpdateMechanism
# have been omited because their configuration is not really needed in a container environment
Expand Down

0 comments on commit bfaacbe

Please sign in to comment.