23 lines
619 B
Docker
23 lines
619 B
Docker
FROM python:3.12-alpine as python
|
|
WORKDIR /app
|
|
ENV PYTHONUNBUFFERED 1
|
|
ENV TZ="Europe/Riga"
|
|
|
|
COPY requirements /app/requirements
|
|
RUN apk add libpq \
|
|
poppler-utils zlib-dev \
|
|
# curl \
|
|
&& pip install --no-cache-dir --upgrade -r requirements/production.txt \
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
COPY entrypoint.sh /entrypoint
|
|
COPY . /app
|
|
RUN chmod +x /entrypoint \
|
|
&& sed -i 's/\r$//g' /entrypoint
|
|
|
|
# Default listening address - 0.0.0.0:5000
|
|
EXPOSE 5000
|
|
|
|
ENTRYPOINT ["/entrypoint"]
|
|
CMD ["uvicorn", "--workers", "2", "--proxy-headers", "--host", "0.0.0.0", "--port", "5000", "--forwarded-allow-ips=*", "service.main:app"]
|