- python3.7
- pip
pip install -r requirements.txt
example
SECRET_KEY=this-is-very-secret
DATABASE_URL=valid-database-url-string # default is sqlite.postgres drivers are alse installed
DEBUG=True
- Django:
python manage.py migrate && python manage.py collectstatic --noinput
- Database's initial state: Execute queries from initial_state.sql modifying parameters as per ned
cd web && python manage.py runserver
python manage.py test
- Use Dockerfile for production. Steps:
1. Set SECRET_KEY, DEBUG and DATABASE_URL environment variables. Can also be done with docker run
2. Setup database
3. docker build -t <tag> .
4. docker run <tag>
- Use docker-compose.yml for local development. Steps:
1. docker-compose up --build
2. docker exec -it <container_id> python web/manage.py createsuperuser # this is to create a superuser
3. Follow django-allauth settings to set the website settings from django admin panel.