Dockerized:
- Django
- PostgreSQL
Get up to speed quicker with an already Dockerized Django + Postgres app.
docker-compose up
- Navigate to http://localhost:8000
In "web" Docker container...
-
create admin
python manage.py createsuperuser --email admin@example.com --username admin
- Navigate to http://localhost:8000/api/users/ to view users
-
create new app
cd app/apps/
python ../../manage.py startapp sample
-
run shell with django app loaded
python manage.py shell_plus
cd DockerDjango
cp git-hooks/pre-commit .git/hooks/
chmod +x .git/hooks/pre-commit
...or all as one line:
cd DockerDjango && cp git-hooks/pre-commit .git/hooks/ && chmod +x .git/hooks/pre-commit
Citation: https://docs.docker.com/samples/django/