- Created a README file - Added PyCharm/IntelliJ IDE run configuration - Squashed bugs related to: - Code style - Default Postgre database URL schema - Updated project dependencies Reviewed-on: #1 Co-authored-by: Ēriks K <git@72.lv> Co-committed-by: Ēriks K <git@72.lv>
23 lines
637 B
Docker
23 lines
637 B
Docker
FROM python:3.12-alpine AS python
|
|
WORKDIR /app
|
|
ARG ENVIRONMENT=local
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV TZ="Europe/Riga"
|
|
|
|
COPY requirements /app/requirements
|
|
RUN apk add libpq \
|
|
poppler-utils zlib-dev \
|
|
&& pip install --no-cache-dir --upgrade -r requirements/${ENVIRONMENT}.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.api.main:app"]
|