Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Problemas inicialização com docker compose. #7

Open
GabrielDS opened this issue Oct 2, 2020 · 0 comments · May be fixed by #82
Open

Problemas inicialização com docker compose. #7

GabrielDS opened this issue Oct 2, 2020 · 0 comments · May be fixed by #82

Comments

@GabrielDS
Copy link

Problema

Ao tentar inicializar a aplicação através do comando $ docker-compose up acabei recebendo o seguinte erro:

Attaching to censo
censo  | python: can't open file 'censo/manage.py': [Errno 2] No such file or directory
censo exited with code 2

Solução

No atributo command no arquivo docker-compose.yaml o comando principal do container está sendo executado dessa forma:

bash -c "python censo/manage.py makemigrations && python censo/manage.py migrate && python censo/manage.py runserver 0.0.0.0:8000"

Está sendo passado a pasta "censo" junto com o parametro manage.py. Não há necessidade de adicionar o path pois o manage.py se encontrará no root da pasta code/.

Trocando o comando atual, para o seguinte, resolve o problema:

bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
@jaswdr jaswdr linked a pull request Jun 24, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant