Skip to content

Commit

Permalink
environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dom-inic committed Nov 28, 2023
1 parent 4b78724 commit 117bd42
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
17 changes: 0 additions & 17 deletions procentapi/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,6 @@
WSGI_APPLICATION = 'procentapi.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases


# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql',
# 'NAME': 'postgres',
# 'USER': 'postgres',
# 'PASSWORD': 'postgres',
# 'HOST': 'db',
# 'PORT': 5432
# }
# }



# Password validation
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators

Expand Down
8 changes: 4 additions & 4 deletions procentapi/settings/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
'Expires': 'Sun, 27 Feb 2099 20:00:00 GMT',
'Cache-Control': 'max-age=94608000',
}
REDIS_HOST = 'ec2-44-196-160-1.compute-1.amazonaws.com'
REDIS_PORT = '16340'
REDIS_DB = 1
REDIS_HOST = os.environ['REDIS_HOST']
REDIS_PORT = os.environ['REDIS_PORT']
REDIS_DB = os.environ['REDIS_DB']

# Celery Configuration docker
CELERY_BROKER_URL = 'rediss://:p6da119e6d04a68daf6bfa00b216a2a45605feceee98f003355d56c3c9d177b0d@ec2-44-196-160-1.compute-1.amazonaws.com:16340'
CELERY_BROKER_URL = os.environ['CELERY_RESULT_BACKEND']
10 changes: 5 additions & 5 deletions procentapi/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
REDIS_HOST = 'ec2-52-70-18-167.compute-1.amazonaws.com'
REDIS_PORT = '23940'
REDIS_DB = 1
REDIS_HOST = os.environ['REDIS_HOST']
REDIS_PORT = os.environ['REDIS_PORT']
REDIS_DB = os.environ['REDIS_DB']

# # Celery Configuration docker
CELERY_BROKER_URL = 'amqps://mnblvtxv:[email protected]/mnblvtxv'
CELERY_RESULT_BACKEND = 'redis://ec2-52-70-18-167.compute-1.amazonaws.com:23940/1'
CELERY_BROKER_URL = os.environ['CELERY_BROKER_URL']
CELERY_RESULT_BACKEND = os.environ['CELERY_RESULT_BACKEND']

django_heroku.settings(locals(), test_runner=False)

0 comments on commit 117bd42

Please sign in to comment.