Skip to content

Commit

Permalink
Keep working on ENTRYPOINT and CMD
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Oct 8, 2024
1 parent 51002cb commit fbeb392
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions backend-py/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ FROM python:slim-bookworm AS deploy
# Output to stdout/stderr, don't create .pyc files, etc.
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH="/app/.venv/bin:$PATH" \
PORT=3000
PATH="/app/.venv/bin:$PATH"

# Packages
RUN apt update && \
Expand All @@ -30,14 +29,13 @@ COPY logger.conf ./
COPY ./src ./src

# Start with non-privileged user
HEALTHCHECK --interval=300s --timeout=10s CMD curl -f http://localhost:${PORT}
HEALTHCHECK --interval=300s --timeout=10s CMD curl -f http://localhost:3000
USER 1001
ENTRYPOINT [ "uvicorn" ]
CMD [ \
"sh", "-c", \
"uvicorn", \
"src.main:app", \
"--host", "0.0.0.0", \
"--port", "${PORT}", \
"--port", "3000", \
"--workers", "1", \
"--server-header", \
"--date-header", \
Expand Down

0 comments on commit fbeb392

Please sign in to comment.