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 167f333
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 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,17 +29,16 @@ 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", \
"--limit-concurrency", "1000", \
"--log-config", "./logger.conf" \
]
]

0 comments on commit 167f333

Please sign in to comment.