Explorar el Código

Docker: interpolate FRESHRSS_INSTALL and FRESHRSS_USER variables (#7725)

Closes https://github.com/FreshRSS/FreshRSS/issues/7300
Interpolate `FRESHRSS_INSTALL` and `FRESHRSS_USER` at runtime to allow secrets being passed as environment variables
Tarow hace 9 meses
padre
commit
ef3505bac0
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      Docker/entrypoint.sh

+ 2 - 2
Docker/entrypoint.sh

@@ -52,7 +52,7 @@ php -f ./cli/prepare.php >/dev/null
 if [ -n "$FRESHRSS_INSTALL" ]; then
 	# shellcheck disable=SC2046
 	php -f ./cli/do-install.php -- \
-		$(echo "$FRESHRSS_INSTALL" | sed -r 's/[\r\n]+/\n/g' | paste -s -)
+		$(eval "echo \"$FRESHRSS_INSTALL\"" | sed -r 's/[\r\n]+/\n/g' | paste -s -)
 	EXITCODE=$?
 
 	if [ $EXITCODE -eq 3 ]; then
@@ -68,7 +68,7 @@ fi
 if [ -n "$FRESHRSS_USER" ]; then
 	# shellcheck disable=SC2046
 	php -f ./cli/create-user.php -- \
-		$(echo "$FRESHRSS_USER" | sed -r 's/[\r\n]+/\n/g' | paste -s -)
+		$(eval "echo \"$FRESHRSS_USER\"" | sed -r 's/[\r\n]+/\n/g' | paste -s -)
 	EXITCODE=$?
 
 	if [ $EXITCODE -eq 3 ]; then