WIP: fix review apps
This commit is contained in:
Родитель
e83bec051f
Коммит
073cb90531
30
app.json
30
app.json
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"name": "network-pulse-api",
|
||||
"scripts": {
|
||||
},
|
||||
"env": {
|
||||
"HEROKU_APP_NAME": {
|
||||
"required": true
|
||||
},
|
||||
"REDIRECT_URIS": {
|
||||
"required": true
|
||||
},
|
||||
"client_id": {
|
||||
"required": true
|
||||
},
|
||||
|
@ -12,14 +16,26 @@
|
|||
"CORS_ORIGIN_WHITELIST": {
|
||||
"required": true
|
||||
},
|
||||
"redirect_uris": {
|
||||
"AWS_ACCESS_KEY_ID": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"formation": {
|
||||
},
|
||||
"AWS_S3_CUSTOM_DOMAIN": {
|
||||
"required": true
|
||||
},
|
||||
"AWS_SECRET_ACCESS_KEY": {
|
||||
"required": true
|
||||
},
|
||||
"AWS_STORAGE_BUCKET_NAME": {
|
||||
"required": true
|
||||
},
|
||||
"AWS_STORAGE_ROOT": {
|
||||
"required": true
|
||||
},
|
||||
"USE_S3": "True",
|
||||
"SSL_PROTECTION": "True"
|
||||
},
|
||||
"addons": [
|
||||
"heroku-postgresql"
|
||||
"heroku-postgresql:hobby-dev"
|
||||
],
|
||||
"buildpacks": [
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ env = environ.Env(
|
|||
USE_S3=(bool, False),
|
||||
SSL_PROTECTION=(bool, False),
|
||||
CORS_REGEX_WHITELIST=(tuple, ()),
|
||||
HEROKU_APP_NAME=(str, ''),
|
||||
)
|
||||
SSL_PROTECTION = env('SSL_PROTECTION')
|
||||
|
||||
|
@ -47,6 +48,12 @@ ALLOWED_HOSTS = os.getenv(
|
|||
'test.example.com,localhost,network-pulse-api-staging.herokuapp.com,network-pulse-api-production.herokuapp.com'
|
||||
).split(',')
|
||||
|
||||
# Adding support for Heroku review app
|
||||
if env('HEROKU_APP_NAME'):
|
||||
herokuReviewAppHost = env('HEROKU_APP_NAME') + '.herokuapp.com'
|
||||
ALLOWED_HOSTS.append(herokuReviewAppHost)
|
||||
|
||||
|
||||
SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
|
||||
SESSION_COOKIE_AGE = 60 * 60 * 24 * 31
|
||||
SECRET_KEY = 'Oh my god I love cake so much holy shit how amazing is cake; like, seriously?'
|
||||
|
|
Загрузка…
Ссылка в новой задаче