2023-03-09 20:49:12 +05:30
|
|
|
#!/bin/bash
|
2023-05-03 13:36:55 +05:30
|
|
|
cp ./.env.example ./.env
|
2023-03-09 20:49:12 +05:30
|
|
|
|
2023-05-25 10:24:20 +05:30
|
|
|
# Export for tr error in mac
|
2023-04-10 17:43:19 +05:30
|
|
|
export LC_ALL=C
|
|
|
|
|
export LC_CTYPE=C
|
2023-05-25 10:24:20 +05:30
|
|
|
|
|
|
|
|
# Generate the NEXT_PUBLIC_API_BASE_URL with given IP
|
|
|
|
|
echo -e "\nNEXT_PUBLIC_API_BASE_URL=http://$1" >> ./.env
|
|
|
|
|
|
|
|
|
|
# Generate the SECRET_KEY that will be used by django
|
|
|
|
|
echo -e "SECRET_KEY=\"$(tr -dc 'a-z0-9!@#$%^&*(-_=+)' < /dev/urandom | head -c50)\"" >> ./.env
|
|
|
|
|
|
|
|
|
|
# WEB_URL for email redirection and image saving
|
|
|
|
|
echo -e "WEB_URL=$1" >> ./.env
|