This repo contains the starting point to create Django application on Docker.
Requirements
- You need to have Docker and Docker Compose installed
Run in root folder,
cp .env.example .env
docker-compose build && docker-compose up -d
Login to the container,
docker exec -u serveruser -it app_wsgi /bin/bash -c "TERM=$TERM exec bash"
Initial setup,
cd ~/web/app/main
python manage.py migrate
Create admin user,
python manage.py createsuperuser
Create static files,
python manage.py collectstatic
Check http://127.0.0.1/admin on your browser and login as admin.
Exit the container,
exit
Stop the containers,
docker-compose down
Don't use this in production. It is for educational purposes only. The SECRET_KEY is in source control for Christ's sake.