I am using cookiecutter-django with docker.
It works nicely when I manually run the docker server.
I would like to use the Django server
configurations from PyCharm to quickly run the server.
I would appreciate some help on how to set it up.
As an interpreter I chose: add remote
and Selected Docker
from the radio buttons. I left the other configurations as they were.
When I then try to run the server with that config. The default name from cookiecutter-django's setup was "Docker: runserver" I get this error:
...
File "/usr/local/lib/python3.5/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: could not translate host name "postgres" to address: Name or service not known
Any ideas on how to fix that? A tutorial on how to setup PyCharm for django-cookiecutter with Docker would be awesome. I am willing to write one if I get it done.