Skip to content Skip to sidebar Skip to footer

Can't Access The Django Server At Http://127.0.0.1:8000/

At firt time it worked totally fine but it is showing this issue now: app$ python manage.py runserver Performing system checks... System check identified no issues (0 silenced). S

Solution 1:

for develop you can try

in settings.py:

ALLOWED_HOSTS = ['*']

and then

python manage.py runserver 0.0.0.0:8000

Solution 2:

To answer your question of

What could have been possibly wrong?

A number of things:

  1. The mapping of your parts is incorrect. Your application is mapping to another port other than 8000. Check which port your application is mapped to. Not by checking the output of python manage.py runserver, because that is not the command you run in your container. Check the logs of your container.
  2. When your command gosu app bash is run, there is an error. Check the output of docker logs backend.
  3. You could be running the docker-compose up -d command incorrectly.

Post the out put of the logs if you want more information.

Post a Comment for "Can't Access The Django Server At Http://127.0.0.1:8000/"