Answer the question
In order to leave comments, you need to log in
I can't connect to a Django project running through docker, what should I do?
Trying to curb Docker, tried running having a Django project
FROM python:3.6
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY . /code/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
version: '3'
services:
web:
build: .
command: python app/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- '8000:8000'
docker-compose up -d
and check the flood docker-compose ps
it gives:Name Command State Ports
--------------------------------------------------------------------------------------------
backendtopstudentsru_web_1 python app/manage.py runse ... Up 0.0.0.0:8000->8000/tcp
Answer the question
In order to leave comments, you need to log in
Try like this:
version: '3'
services:
web:
build: .
command: python app/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- '0.0.0.0:8000:8000'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question