|
FROM node:lts-alpine |
|
|
|
EXPOSE 3000 |
|
ENV TZ=Asia/Shanghai x-cursor-checksum=JLW3sDWq1dba548430e9e47ed8b290f973b3814d91f2a0c9bff5eaea63978223a18a2c32/abf905fd16e487569677d4632148bc1e457977b68337ff091504d4873ea9f77d |
|
|
|
WORKDIR /app |
|
RUN apk add git |
|
RUN git clone https://github.com/zhx47/cursor-api.git . |
|
|
|
|
|
RUN yarn config set registry https://registry.npmmirror.com/ |
|
RUN yarn |
|
|
|
RUN sed -i 's/\/v1\/chat\/completions/\/hf\/v1\/chat\/completions/g' src/index.js |
|
RUN sed -i '/\/\/ 启动服务器/c\app.get("/", async (req, res) => {\n return res.status(200).send("hello world!");\n});' src/index.js |
|
|
|
CMD ["npm", "run", "start"] |