In this tutorial we will create a new Django project using Docker and PostgreSQL. Django ships with built-in SQLite support but even for local deve...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks for the tutorial, that's just what I needed atm.
I stepped into some problems, though. After switching to postgres you install psycopg2-binary locally but not in the container, right? but it's needed there to run, so I had to do it manually with
docker-compose exec web pipenv install psycopg2-binary. Is this the right way?In any case, when trying to run the migration I get this other error:
django.db.utils.OperationalError: could not translate host name "db" to address: Name or service not known.How can I fix this?
You can also try wemake-django-template: it has everything from this article in place. Docker for both development and production,
docker-composefor better DX,djangoas the main framework, andpostgresas the database.Check it out:
Bleeding edge django template focused on code quality and security.
wemake-django-template
Bleeding edge
django2.2template focused on code quality and security.Purpose
This project is used to scaffold a
djangoproject structure Just likedjango-admin.py startprojectbut better.Features
python3.7+build,test, anddeploypipeline configured by defaulthttp/2turned on by defaultInstallation
Firstly, you will need to install dependencies:
Then, create a project itself:
Who are using this template?
If you use our template, please add yourself or your company in the list.
We offer free email support for anyone who is using this If you have any problems or questions,…