We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ca38c3 commit fd54810Copy full SHA for fd54810
scripts/entrypoint.sh
@@ -18,6 +18,19 @@ if [ "${PUID}" != "0" ] || [ "${PGID}" != "0" ]; then
18
echo "Changing owner to $PUID:$PGID, done."
19
fi
20
21
+# support __FILE Suffix for environment variables
22
+for file_var in $(env | grep '__FILE='); do
23
+ target_var=$(echo "$file_var" | cut -d'=' -f1 | sed 's/__FILE//')
24
+ file_path=$(echo "$file_var" | cut -d'=' -f2)
25
+
26
+ if [ -f "$file_path" ]; then
27
+ export "$target_var"=$(cat "$file_path" | tr -d '\n\r')
28
+ echo "Info: Loaded secret for $target_var from $file_path"
29
+ else
30
+ echo "Warning: Secret file $file_path not found for $target_var"
31
+ fi
32
+done
33
34
if [ "${PUID}" != "0" ]; then
35
exec su-exec $PUID:$PGID "$@"
36
else
0 commit comments