getapi commited on
Commit
7734ad6
·
1 Parent(s): 1dc4d81

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -8
Dockerfile CHANGED
@@ -1,16 +1,9 @@
1
  FROM python:3.11
2
  ARG DEPS
3
  WORKDIR /code
4
- RUN apt-get update && apt-get install -y zip unzip
5
  RUN $DEPS
6
  RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
7
  --mount=type=secret,id=APP_URL,mode=0444,required=true \
8
  curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o app.py $(cat /run/secrets/APP_URL)
9
- RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
10
- --mount=type=secret,id=BIN_URL,mode=0444,required=true \
11
- curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o get_binary.py $(cat /run/secrets/BIN_URL)
12
  COPY . .
13
- RUN python get_binary.py
14
- RUN chmod 777 /code/bito && chmod +x /code/bito && chmod 777 /tmp && chmod 777 /code && ls -l /code/bito
15
- RUN /code/bito -h
16
- CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "4", "--worker-class", "gevent", "--log-level=info"]
 
1
  FROM python:3.11
2
  ARG DEPS
3
  WORKDIR /code
 
4
  RUN $DEPS
5
  RUN --mount=type=secret,id=TOKEN,mode=0444,required=true \
6
  --mount=type=secret,id=APP_URL,mode=0444,required=true \
7
  curl -H "Authorization: Bearer $(cat /run/secrets/TOKEN)" -o app.py $(cat /run/secrets/APP_URL)
 
 
 
8
  COPY . .
9
+ CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "4", "--worker-class", "gevent", "--log-level=warn"]