13 lines
627 B
Docker
13 lines
627 B
Docker
FROM python:3.12-slim
|
|
WORKDIR /srv
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY app ./app
|
|
COPY release ./release
|
|
COPY docs/user-guide.pdf ./docs/user-guide.pdf
|
|
COPY docs/presentation/presentation.pdf docs/presentation/presentation.pptx ./docs/presentation/
|
|
EXPOSE 8000
|
|
# Заголовкам X-Forwarded-* доверяем только прокси из FORWARDED_ALLOW_IPS (адрес NPM), а не всем подряд
|
|
ENV FORWARDED_ALLOW_IPS=127.0.0.1
|
|
CMD ["sh", "-c", "exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --proxy-headers --forwarded-allow-ips \"$FORWARDED_ALLOW_IPS\""]
|