forked from Xcov19/covidX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
secrets.sh
executable file
·29 lines (28 loc) · 1.19 KB
/
secrets.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
if [ -f ".env" ]; then rm .env; fi;
touch .env
echo "SECRET_KEY=$(gcloud secrets versions access latest --secret='SECRET_KEY');" >> .env
echo "" >> .env
echo "DB_PORT=5432" >> .env
export "SECRET_KEY=$SECRET_KEY";
echo "" >> .env
echo "SOCIAL_AUTH_TRAILING_SLASH=False # Remove trailing slash from routes" >> .env
echo "" >> .env
echo "SOCIAL_AUTH_AUTH0_DOMAIN=$(gcloud secrets versions access latest --secret='SOCIAL_AUTH_AUTH0_DOMAIN')" >> .env
echo "" >> .env
echo "SOCIAL_AUTH_AUTH0_KEY=$(gcloud secrets versions access latest --secret='SOCIAL_AUTH_AUTH0_KEY')" >> .env
echo "" >> .env
echo "SOCIAL_AUTH_AUTH0_SECRET=$(gcloud secrets versions access latest --secret='SOCIAL_AUTH_AUTH0_SECRET')" >> .env
echo "" >> .env
echo "ACCESS_TOKEN_METHOD=POST" >> .env
echo "" >> .env
echo "ALGOLIA_API_KEY=$(gcloud secrets versions access latest --secret='ALGOLIA_API_KEY')" >> .env
echo "" >> .env
echo "ALGOLIA_APPLICATION_ID=$(gcloud secrets versions access latest --secret='ALGOLIA_APPLICATION_ID')" >> .env
echo "" >> .env
echo "DJANGO_ALLOWED_HOST=localhost" >> .env
echo "" >> .env
echo "SETTINGS_ENV=covidX.settings.base" >> .env
echo "" >> .env
echo "POSTGRES_DB_HOST=postgres" >> .env
echo "" >> .env