File size: 521 Bytes
1883d44 b52e420 1883d44 b52e420 29f7c3d 1883d44 29f7c3d |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
FROM python:3.11
ARG DEPS
WORKDIR /code
RUN chmod 777 /code
RUN $DEPS
RUN mkdir -p /.cache && chmod 777 /.cache
RUN playwright install-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 ["sh", "-c", "playwright install firefox && gunicorn app:app --bind 0.0.0.0:7860 --timeout 120 --workers 4 --worker-class gevent --log-level=warn"]
|