mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00

* Release 0.4.5 * Update @waylaidwanderer/node-chatgpt-api to latest version * Update dockerfiles to use workspaces and ensure packages are @ latest * Remove package-lock.json files from workspace directories as no longer needed * refactor(api): remove deprecated text-davinci-002-render-paid model from CHATGPT_MODELS refactor(api/client): change model comparison to use startsWith() instead of === for GPT-4 models
32 lines
775 B
Docker
32 lines
775 B
Docker
# Base node image
|
|
FROM node:19-alpine AS base
|
|
WORKDIR /api
|
|
COPY /api/package*.json /api/
|
|
WORKDIR /client
|
|
COPY /client/package*.json /client/
|
|
WORKDIR /
|
|
COPY /package*.json /
|
|
RUN npm ci
|
|
|
|
# React client build
|
|
FROM base AS react-client
|
|
WORKDIR /client
|
|
COPY /client/ /client/
|
|
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
|
RUN npm run build
|
|
|
|
# Node API setup
|
|
FROM base AS node-api
|
|
WORKDIR /api
|
|
COPY /api/ /api/
|
|
COPY --from=react-client /client/dist /client/dist
|
|
EXPOSE 3080
|
|
ENV HOST=0.0.0.0
|
|
CMD ["npm", "start"]
|
|
|
|
# Optional: for client with nginx routing
|
|
FROM nginx:stable-alpine AS nginx-client
|
|
WORKDIR /usr/share/nginx/html
|
|
COPY --from=react-client /client/dist /usr/share/nginx/html
|
|
COPY client/nginx.conf /etc/nginx/conf.d/default.conf
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|