File size: 391 Bytes
69b08e3
 
 
cc29edb
69b08e3
 
 
 
 
cc29edb
 
1
2
3
4
5
6
7
8
9
10
11
FROM python:3.11
ARG DEPS
WORKDIR /code
RUN chmod 777 /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 . .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] #, "--reload"]