23 lines
542 B
Docker
Executable File
23 lines
542 B
Docker
Executable File
FROM python:3.11-alpine AS base
|
|
|
|
FROM base AS builder
|
|
|
|
WORKDIR /app
|
|
COPY requirements.txt /app
|
|
RUN pip wheel --no-cache-dir -q \
|
|
--no-deps --wheel-dir /app/wheels \
|
|
-r requirements.txt
|
|
|
|
FROM base AS runner
|
|
|
|
COPY --from=builder /app/wheels /wheels
|
|
RUN pip install --no-cache-dir -q /wheels/*
|
|
COPY proxy/ /proxy/
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
EXPOSE 5050
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
|
CMD python3 /proxy/test.py
|
|
|
|
CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:5050", "proxy:proxy_app"]
|