Sometimes when you start a project locally, by using the Divio app or running divio project up, you will get an error:

Waiting for project to start................................Error: 
Project failed to start. Please run 'docker-compose logs' to get more information.

The first thing to do is to follow that advice and check the logs:

> docker-compose logs
[..]
web_1  | django.db.utils.OperationalError: FATAL:  database "db" does not exist

This is a message from Django the web_1  container, informing you that it couldn't reach the database.

Check that your local database exists

One possible solution is that your local database is missing. This can be the case after upgrading from the old Docker Toolbox/VirtualBox setup to the new native Docker, because it doesn't preserve local volumes.

The answer is to pull down your database from the Divio Cloud server. You can either use the Download option in the Divio app, or run divio project pull db.  

Then you should be able to launch your local project.

Relaunch Docker

Sometimes, even this will fail. When you try to pull down the database, you will get a message: NOTICE:  database "db" does not exist, skipping or Couldn't connect to database container. Database server may not have started. 

This is typically an issue with Docker itself, and can usually be remedied by shutting down and relaunching the Docker application (note: simply using Restart in the Docker menu may not solve the problem - you need to quit and relaunch).

Did this answer your question?