migration first-run: OperationalError: could not translate host name "postgres" to address: Name does not resolve
Hello, thank you for contributing to such a cool and useful application. I'm interested in making some contributions and got stuck while trying to set up a local dev environment for funkwhale, possibly because of a network configuration issue on my end. After the first docker-compose command to build funkwhale docker-compose -f dev.yml build
, I try to setup the database schema:
docker-compose -f dev.yml run --rm api python manage.py migrate
and this fails with the following error:
django.db.utils.OperationalError: could not translate host name "postgres" to address: Name does not resolve
I've looked around and found several links that point to the problem being a missing entry in /etc/hosts
, but I don't know how/if anyone here encountered or solved this problem. I appreciate any help here, thank you!
OS: Ubuntu 18.04 Docker Version:
Client:
Version: 18.09.7
API version: 1.39
Go version: go1.10.8
Git commit: 2d0083d
Built: Thu Jun 27 17:56:17 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.7
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 2d0083d
Built: Thu Jun 27 17:23:02 2019
OS/Arch: linux/amd64
Experimental: false
Docker-Compose version
docker-compose version 1.16.1, build 6d1ac21
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016