ai-query对接新版freesun-agent接口的分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
680 B

FROM alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/node:20.16 AS build-stage
USER root
RUN rm -f /etc/localtime && ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
WORKDIR /app
COPY package*.json ./
COPY .npmrc ./
RUN npm config set fetch-timeout 60000 # 设置请求超时时间为 60 秒
RUN npm config set fetch-retries 5 # 设置重试次数
RUN npm install --loglevel=http --frozen-lockfile
COPY . /app
RUN npm run build
RUN rm -f /dist/client/assets/index-Leg2PMPl.js
RUN rm -f /app/dist/client/assets/index-Leg2PMPl.js
ENV NODE_ENV=production
ENV PORT=8080
EXPOSE 8080
CMD ["npm", "start"]