Running Migrations for Django 2.0


I’m a bit stuck trying to run migration commands for my django application. Can someone please guide me?

[On Heroku, I had to login through Bash console and then run it.]



You can log into the server and then use “docker exec”. We are currently in the process of integrating this feature with the CLI which will be the recommended way to run bash commands in the executing container.

Step 1.
Find the name of the docker container by using the command docker ps -a

Step 2.
Run the command.
"docker exec upbeat_yonath sh -c “ls -lart”

Note, in the above command “upbeat_yonath” is the container name


Everything that doesn’t require database migrations is running fine.
I tried following what you just mentioned, but it seems like the container has python3.4 whereas I have mentioned python3.6 in runtime.txt. Also, mongod returns command not found and can’t import Django in python shell. So I don’t think that’s where the container application is running.


We do not run mongo in the container running the application. Mongo runs as a separate process on the host for now. I checked your deployment and it appears to me the Mongo process is not even running on the server. It will be best in your case to remove the application and try the deployment again.