diff --git a/backend/core/production_settings.py b/backend/core/production_settings.py index 9e7903c..a265744 100644 --- a/backend/core/production_settings.py +++ b/backend/core/production_settings.py @@ -182,7 +182,7 @@ DATABASES = { # Cache -CACHES_LOCATION = f"{config('DB_NAME', default='db_test')}_cache" +CACHES_LOCATION = "accesstokencache" CACHES = { "default": { diff --git a/backend/core/settings.py b/backend/core/settings.py index 81a7472..7532f01 100644 --- a/backend/core/settings.py +++ b/backend/core/settings.py @@ -1,3 +1,5 @@ +import os + if os.environ.get("DJANGO_ENV") == "PRODUCTION": from .production_settings import * else: diff --git a/backend/railway.json b/backend/railway.json index 8289b1a..f78d5c0 100644 --- a/backend/railway.json +++ b/backend/railway.json @@ -1,11 +1,11 @@ { - "$schema": "https://railway.app/railway.schema.json", - "build": { - "builder": "NIXPACKS" - }, - "deploy": { - "startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn --timeout 500 main.wsgi", - "restartPolicyType": "NEVER", - "restartPolicyMaxRetries": 10 - } -} \ No newline at end of file + "$schema": "https://railway.app/railway.schema.json", + "build": { + "builder": "NIXPACKS" + }, + "deploy": { + "startCommand": "python manage.py migrate && python manage.py createcachetable accesstokencache && gunicorn --timeout 500 main.wsgi", + "restartPolicyType": "NEVER", + "restartPolicyMaxRetries": 10 + } +}