Unable to deploy django site

Issues information

Your issue

Whenever I deploy it, it fails

Dockerfile content (if any)

FROM python:3.8.0-alpine

WORKDIR /usr/src/app

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev

RUN pip install --upgrade pip
COPY ./requirements.txt /usr/src/app/requirements.txt
RUN pip install -r requirements.txt

COPY djangofollow /usr/src/app/
COPY entrypoint.sh /usr/src/app

EXPOSE 8000

ENTRYPOINT ["./entrypoint.sh"] 

Hello, I’m checking your issue

His dockerfile is so confusing, when we specify a WORKDIR, we use ./ in the copy commands right, but this guy is using /usr/src/app/, might be happening due to this one,
the command COPY ./requirements.txt /usr/src/app/requirements.txt could make a problem like creating /usr/src/app/ directory again in the WORKDIR.

Ya, I don’t exactly know Docker. I just copied this dockerfile from a tutorial for deploying django to Qovery. Can you help with dockerfile ?

FROM python:3.8.0-alpine

WORKDIR /usr/src/app

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev

RUN pip install --upgrade pip
COPY requirements.txt ./
RUN pip install -r requirements.txt

COPY djangofollow ./
COPY entrypoint.sh ./

EXPOSE 8000

ENTRYPOINT ["./entrypoint.sh"]

Try this one :blush:

I tried this , but again got deployment failed. :pensive:

can you share your error pls

1 Like

Hello @dilutewater, did you manage to fix the issue / Dockerfile?

NVM I fixed everything :sweat_smile: :tada: