Why am I unable to run django migrations via the 'docker-compose run web' command?

后端 未结 2 1072
情话喂你
情话喂你 2021-02-01 23:05

So I am deploying django, postgress and nginx containers via docker-compose and I have an issue that I can\'t seem to figure out.

In order to resolve the following error

2条回答
  •  梦如初夏
    2021-02-01 23:47

    Dan Lowe gave a very nice answer, but the entrypoint script was not working for me. The problem is that some "makemigrations" expect your input, for instance "yes"/"no".

    You can complement Dan Lowe answer with:

    python manage.py makemigrations --noinput
    

    instead of

    python manage.py makemigrations
    

    (This works at least for simple "yes"/"no" questions)

提交回复
热议问题