Created
March 3, 2021 08:52
-
-
Save mrunkel/39d08321a03a0265cc355302f3a146ba to your computer and use it in GitHub Desktop.
A little script to move variables from your symfony .env files to secrets quickly and easily.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
typeset -a names | |
names=(DATABASE_URL RUBYOA_DB_URL PHPOA_DB_URL\ | |
MAILER_DSN APP_SECRET APP_DEBUG SHELL_VERBOSITY\ | |
PIWIK_ID PIWIK_SECRET PIWIK_URL\ | |
AMS_SERVER AMS_USER AMS_PORT AMS_PATH\ | |
) | |
env=$1 | |
if [ -z "$env" ]; then | |
env='localdev' | |
fi | |
for name in "$names[@]" ; do | |
echo $name | |
echo '' | ./bin/console secrets:set $name -e$env - | |
done | |
./bin/console secrets:encrypt-from-local -e$env | |
./bin/console secrets:list -e$env --reveal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment