diff --git a/{{cookiecutter.project_slug}}/railway.json b/{{cookiecutter.project_slug}}/railway.json new file mode 100644 index 000000000..e629e816f --- /dev/null +++ b/{{cookiecutter.project_slug}}/railway.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://railway.app/railway.schema.json", + "build": { + "builder": "NIXPACKS" + }, + "deploy": { + {%- if cookiecutter.use_async == 'y' %} + "startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn config.asgi -k uvicorn.workers.UvicornWorker", + {%- else %} + "startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn config.wsgi", + {%- endif %} + "restartPolicyType": "ON_FAILURE", + "restartPolicyMaxRetries": 10 + } +} \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/requirements.txt b/{{cookiecutter.project_slug}}/requirements.txt index c1b500c2b..a4ca850ac 100644 --- a/{{cookiecutter.project_slug}}/requirements.txt +++ b/{{cookiecutter.project_slug}}/requirements.txt @@ -1,3 +1,3 @@ -# This file is expected by Heroku. +# This file is expected by Heroku/Railway. -r requirements/production.txt