Getting timout error in dockerized webservice

I just deployed a fastapi server with docker runtime.

Here is my Dockerfile

FROM python:3.10-buster

ENV VAR1=10

# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1

# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1

# Install rust
RUN curl --proto '=https' --tlsv1.2 -sSf -y https://sh.rustup.rs | sh
ENV PATH /home/pn/.cargo/bin:$PATH

# Install & use pipenv
COPY Pipfile .
RUN python -m pip install --upgrade pip
RUN pip install pipenv
RUN pipenv lock && pipenv --clear && pipenv --rm
RUN GIT_LFS_SKIP_SMUDGE=1 pipenv install --system

WORKDIR /app
COPY . /app
EXPOSE 3000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "3000"]

SOLVED

had to set port to 10000
a bit disappointing render mentions this internal port related restrictions nowhere

Hi,

Glad to hear you got your issue resolved.

However, port 10000 is not a requirement, and the docs cover Web Service - Host and Port Configuration

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.