2023-03-09 15:19:12 +00:00
|
|
|
#!/bin/bash
|
2023-05-03 08:06:55 +00:00
|
|
|
cp ./.env.example ./.env
|
2023-03-09 15:19:12 +00:00
|
|
|
|
2023-05-25 04:54:20 +00:00
|
|
|
# Export for tr error in mac
|
2023-04-10 12:13:19 +00:00
|
|
|
export LC_ALL=C
|
|
|
|
export LC_CTYPE=C
|
2023-05-25 04:54:20 +00:00
|
|
|
|
2023-05-25 06:54:03 +00:00
|
|
|
|
2023-05-25 04:54:20 +00:00
|
|
|
# Generate the NEXT_PUBLIC_API_BASE_URL with given IP
|
2023-05-26 05:39:59 +00:00
|
|
|
echo -e "\nNEXT_PUBLIC_API_BASE_URL=$1" >> ./.env
|
2023-05-25 04:54:20 +00:00
|
|
|
|
|
|
|
# Generate the SECRET_KEY that will be used by django
|
2023-05-29 06:41:16 +00:00
|
|
|
echo -e "SECRET_KEY=\"$(tr -dc 'a-z0-9' < /dev/urandom | head -c50)\"" >> ./.env
|
2023-05-25 04:54:20 +00:00
|
|
|
|
|
|
|
# WEB_URL for email redirection and image saving
|
2023-05-25 06:54:03 +00:00
|
|
|
echo -e "WEB_URL=$1" >> ./.env
|