- Add a new user (see useradd)
- Setup a database (see postgresql)
- Clone repo
git clone <github_repo_url>
cd django_project_dir
- Create a virtual-env and install dependencies within it
python3 -m venv ~/.venv/appname
source ~/.venv/appname/bin/activate
- Setup project (django below)
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser
- Create socket/service for app (see systemctl)
- Configure nginx server blocks
- Get a certbot certificate:
sudo certbot --nginx -d www.example.com
See Also