| FROM python:3.11-alpine | |
| RUN apk update && \ | |
| apk add --no-cache tzdata git && \ | |
| cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ | |
| echo "Asia/Shanghai" > /etc/timezone | |
| RUN git clone https://github.com/len-ni/Youcom_api && \ | |
| cd Youcom_api && \ | |
| sed -i "s/debug=True/host='0.0.0.0'/g" api.py && \ | |
| pip install -r requirements.txt && pip install gunicorn | |
| WORKDIR /Youcom_api | |
| EXPOSE 7860 | |
| CMD gunicorn -w 4 -b 0.0.0.0:7860 api:app |