A production-ready Django boilerplate based on DjangoX.
- Django 3.1
- Bootstrap 5
- PostgreSQL
- SSL (in production).
Other Dependencies
- django-crispy-forms to easily build forms.
- django-debug-toolbar to debug the app.
- django-allauth to work with authentication.
- django-environ to collect Django settings from environment variables.
- django-anymail to for sending emails in production.
- whitenoise to serve static files in production.
- gunicorn to run server in production environment.
- psycopg2 to work with PostgreSQL.
Everything is bundled up in a single Docker Compose configuration. So, once you have Docker installed on your machine, all you need to do is run the command below.
$ docker-compose up -d --build
Activate the virtual environment, and install the Python dependencies.
$ source venv/bin/activate
$ pip install -r requirements.txt
To run the development server, you can simply execute the runserver
Django command just like any other django projects.
$ python manage.py runserver
To run the production server, you need to setup the environment variables first, then run gunicorn.
$ export DEBUG=False
$ gunicorn -b 0.0.0.0:8000 config.wsgi:application