Skip to content

Commit

Permalink
Use local postgres and redis (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisumit33 authored May 8, 2023
1 parent e412f51 commit 9faca29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
7 changes: 7 additions & 0 deletions mysterio/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,16 @@
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": ["redis://127.0.0.1:6379"],
},
}
}

CELERY_BROKER_URL = "redis://127.0.0.1:6379"

CELERY_RESULT_BACKEND = "redis://127.0.0.1:6379"


# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
Expand Down
9 changes: 0 additions & 9 deletions mysterio/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@

INSTALLED_APPS.append("django_extensions")

CHANNEL_LAYERS["default"]["CONFIG"] = {
"hosts": ["redis://127.0.0.1:6379"],
}


CELERY_BROKER_URL = "redis://127.0.0.1:6379"

CELERY_RESULT_BACKEND = "redis://127.0.0.1:6379"


SITE_ID = 4

Expand Down
11 changes: 0 additions & 11 deletions mysterio/settings/production.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import dj_database_url
from core import secret_manager

secret_manager.load_secrets()
Expand All @@ -13,11 +12,6 @@
"mysterio-env.eba-jmukjigp.ap-south-1.elasticbeanstalk.com",
]

DATABASES = {"default": dj_database_url.config(conn_max_age=600)}

CHANNEL_LAYERS["default"]["CONFIG"] = {
"hosts": [os.getenv("REDIS_URL")],
}

TEMPLATES[0]["DIRS"] = [
os.path.join(FRONTEND_DIR, "dist"),
Expand All @@ -28,11 +22,6 @@
]


CELERY_BROKER_URL = os.getenv("REDIS_URL")

CELERY_RESULT_BACKEND = os.getenv("REDIS_URL")


SITE_ID = 3

LOGGING["loggers"] = {
Expand Down

0 comments on commit 9faca29

Please sign in to comment.