Download Dockerfile from gdilove/newapi: direct link, hf CLI and curl.
- Browser
- Download file 811 Bytes
-
https://huggingface.co/spaces/gdilove/newapi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/gdilove/newapi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/gdilove/newapi/resolve/main/Dockerfile
811 Bytes
| FROM calciumion/new-api:v0.13.2 | |
| USER root | |
| RUN apt-get update && \ | |
| apt-get install -y postgresql-15 locales && \ | |
| sed -i 's/^# en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen && \ | |
| locale-gen && \ | |
| rm -rf /var/lib/apt/lists/* && \ | |
| pg_dropcluster 15 main || true && \ | |
| rm -rf /etc/postgresql/15 | |
| COPY entrypoint.sh /entrypoint.sh | |
| RUN chmod +x /entrypoint.sh | |
| ENV POSTGRES_USER=root | |
| ENV POSTGRES_PASSWORD=123456 | |
| ENV POSTGRES_DB=new-api | |
| ENV SQL_DSN=postgresql://root:123456@127.0.0.1:5432/new-api?sslmode=disable | |
| ENV TZ=Asia/Shanghai | |
| ENV LANG=en_US.UTF-8 | |
| ENV LC_ALL=en_US.UTF-8 | |
| ENV PORT=3000 | |
| # 默认不清空数据库 | |
| # 如果数据库目录已经坏了,可以在 Hugging Face 变量里临时设置 RESET_PGDATA=1 | |
| ENV RESET_PGDATA=0 | |
| EXPOSE 3000 | |
| VOLUME ["/data"] | |
| ENTRYPOINT ["/entrypoint.sh"] |