Guest User

Untitled

a guest
Jan 16th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. set -euo pipefail
  4.  
  5. if [ ! -e "docker-compose.yml" ]; then
  6. echo "Please run this in the project directory"
  7. exit 1
  8. fi
  9.  
  10. echo "Initializing configuration variables..."
  11. echo "" > .env
  12.  
  13. # Edit the env array below to match your required environment variables
  14. declare -a env=(
  15. SECRET_TOKEN
  16. DATABASE_PASSWORD
  17. )
  18.  
  19. for env in "${env[@]}"; do
  20. echo "${env}=$(openssl rand -base64 20)" >> .env
  21. done
  22.  
  23. echo -e "" >> .env
  24.  
  25. echo "GID=$(id -g)" >> .env
  26. echo "UID=$(id -u)" >> .env
Add Comment
Please, Sign In to add comment