---
title: "Deploy djangorp"
description: "django + redis + postgres with tailwindcss and celery"
category: "Starters"
url: https://railway.com/deploy/AcACbH
---

# Deploy djangorp

django + redis + postgres with tailwindcss and celery

**[Deploy djangorp on Railway](https://railway.com/template/AcACbH)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/AcACbH/manifest.json

- **Creator:** Fauzaan Gasim's Projects
- **Category:** Starters
- **Total deploys:** 71

## Template content

### Redis https://devicons.railway.app/i/redis.svg

- **Image:** bitnami/redis

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:latest

### djangorp

- **Source:** https://github.com/fauzaanu/djangorp
- **Public domain:** Yes

## Documentation

Django + Redis + Postgres

https://github.com/fauzaanu/djangorp/


### Tailwindcss

- The `jstoolchain` folder includes a tailwindcss setup
- You should run `npm i` to install the dependencies
- There is also a `.xml` file for PyCharm users to make it a `File Watcher`
- The `tailwind.config.js` file is configured to search for `html` and `py` files
- `.py` files because forms.py could have tailwindcss classes due to the user of `crispy-forms` with `crispy-tailwind`

### Role of Redis

- Redis is used as a cache firstly
- Secondly, it is used as a message broker for Celery
- Thirdly, it is used as a session store

### Celery

- Celery is used for background tasks that take a long time to complete.
- `tasks.py` is where the tasks are defined and they can be called from anywhere in the project
- `celery.py` is where the celery app is created and configured, explicitly adding the tasks may be required

### Important Notes

- Generate migrations from dev environment and commit them to the repo
- Anything that takes too long to run should be a background task
- There is no need for a `.env` file to be committed to the repo as the `settings.py` file is configured to read from
  the variables defined in railway
- To create a superuser install railway cli and run `railway run python manage.py createsuperuser`
- Split into apps as much as possible (does not make sense early on but will later on)
- `Templates` folder outside will be used for base / navbar / footer templates and anything that is not app specific
- Other templates should be inside the app folder with the recommended naming convention
  of `appfolder/templates/app_name/template_name.html` (e.g. `users/templates/users/login.html`)
- `static` folder outside will be used for base / navbar / footer css and js files and anything that is not app specific
- Other static files should be inside the app folder with the recommended naming convention
  of `appfolder/static/app_name/css/style.css` (e.g. `users/static/users/css/style.css`)
- CSRFTRUSTEDORIGINS might be needed and ifso set to the domain name of the website (e.g. `example.com`)
  inside `settings.py`


## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [WireMock Private API Stubs](https://railway.com/deploy/wiremock-private-api-stubs) — Persistent HTTP API stubs behind generated owner access.

Open this page in a browser: https://railway.com/deploy/AcACbH
