diff --git a/.gitignore b/.gitignore index b7f01df..c1b7dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -140,3 +140,6 @@ GitHub.sublime-settings # certbot configuration certbot/* + +# gcloud credential +credential*.json diff --git a/app/ce_tour/settings.py b/app/ce_tour/settings.py index e94fad4..5433009 100644 --- a/app/ce_tour/settings.py +++ b/app/ce_tour/settings.py @@ -115,13 +115,12 @@ from google.oauth2 import service_account GS_CREDENTIALS = service_account.Credentials.from_service_account_file( - # "credensial.json" - "Credential.json" + os.getenv("GS_CREDENTIALS") ) DEFAULT_FILE_STORAGE = "ce_tour.gcloud.GoogleCloudMediaFileStorage" -GS_PROJECT_ID = "educatour" -GS_BUCKET_NAME = "educatour" +GS_PROJECT_ID = os.getenv("GS_PROJECT_ID") +GS_BUCKET_NAME = os.getenv("GS_BUCKET_NAME") MEDIA_URL = "https://storage.googleapis.com/{}/".format(GS_BUCKET_NAME) # Internationalization