Add script to encode environment variables in .env file
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -f .env ]; then
|
||||||
|
while IFS='=' read -r key value; do
|
||||||
|
if [[ $key != \#* ]] && [[ ! -z "$key" ]]; then
|
||||||
|
echo "SECRET_$key=$(echo -n "$value" | base64)";
|
||||||
|
fi
|
||||||
|
done < .env > .env_encoded
|
||||||
|
else
|
||||||
|
echo "Error: .env file not found."
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user