Trying to install Mezzanine via Docker

I am trying to install Mezzanine on Docker for Docker testing

I used this Container with this postgres db with a few settings (namely commenting) in the Mezzanine container and using a start.sh script to include the DB information.

When I run these 2 Docker commands:

docker run -P --name some_web -p 80:80 --link some_db:db myapp/mezzanine-docker
    db: docker run -d --name="some_db" -e 'PSQL_TRUST_LOCALNET=true' myapp/docker-postgresql:latest

      

It throws this error: Is the server running on host "127.0.0.1" and accepting TCP / IP connections on port 5432?

Why? It just needs a pointer in the right direction.

+3


source to share


1 answer


I agree with @helmbert because sometimes I come across strange behavior docker-compose

. It seems to me that docker-compose

it can't guarantee the order of starting the containers. Therefore, if mezzanine

started before database initialization, it will obviously fail.



But the nature of the error you described indicates that your application is not configured correctly to django

. Check the value DATABASES['default']['HOST']

in settings.py

, it should be equal db

.

+1


source







All Articles