lzlv / Dockerfile
getapi's picture
Create Dockerfile
f0f0b10
raw
history blame
400 Bytes
FROM python:3.11
ARG DEPS
WORKDIR /code
RUN $DEPS
RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
--mount=type=secret,id=APP_URL,mode=0444,required=true \
curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o app.py $(cat /run/secrets/APP_URL)
COPY . .
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "4", "--worker-class", "gevent"]