SHARE
TWEET

Untitled

a guest Jan 16th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top