Skip to content

Commit

Permalink
feat: Allow changing the exposed port of the container. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinderVosDeWael authored Jan 16, 2025
1 parent 73d7a88 commit 310fdfe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM python:3.11-alpine

ENV PORT=8000
RUN pip install poetry

WORKDIR /app
Expand All @@ -8,6 +9,6 @@ COPY src src

RUN poetry install --no-cache

EXPOSE 8000
EXPOSE $PORT

CMD ["poetry", "run", "uvicorn", "cloaiservice.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["sh", "-c", "poetry run uvicorn cloaiservice.main:app --host 0.0.0.0 --port $PORT"]

0 comments on commit 310fdfe

Please sign in to comment.