Skip to content

Commit 6a5b082

Browse files
authored
Fix up container
Signed-off-by: GitHub <[email protected]>
1 parent fdfc345 commit 6a5b082

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,17 @@ FROM python:3.13-slim@sha256:751d8bece269ba9e672b3f2226050e7e6fb3f3da3408b5dcb5d
44
ARG git_sha="development"
55
ENV GIT_SHA=$git_sha
66

7-
WORKDIR /home/api
8-
9-
COPY requirements/requirements.txt .
7+
COPY requirements.txt requirements.txt
108
RUN python -m pip install --requirement requirements.txt
119

12-
COPY pyproject.toml pyproject.toml
10+
COPY pyproject.toml README.md ./
1311
COPY src/ src/
14-
RUN python -m pip install .
12+
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir .
1513

1614
RUN adduser --disabled-password api
1715
USER api
1816

1917
# HTTP
2018
EXPOSE 8080
2119

22-
CMD ["uvicorn", "api.server:app", "--host", "0.0.0.0", "--port", "8080"]
20+
ENTRYPOINT ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker", "api.server:app"]

0 commit comments

Comments
 (0)