mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
Release 0.4.5 (#282)
* 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
This commit is contained in:
parent
45a2aaf7b8
commit
dbf45196ee
14 changed files with 633 additions and 31965 deletions
32
Dockerfile
32
Dockerfile
|
|
@ -1,38 +1,32 @@
|
|||
FROM node:19-alpine AS react-client
|
||||
# Base node image
|
||||
FROM node:19-alpine AS base
|
||||
WORKDIR /api
|
||||
COPY /api/package*.json /api/
|
||||
WORKDIR /client
|
||||
# copy package.json into the container at /client
|
||||
COPY /client/.env /client/.env
|
||||
COPY /client/package*.json /client/
|
||||
# install dependencies
|
||||
WORKDIR /
|
||||
COPY /package*.json /
|
||||
RUN npm ci
|
||||
# Copy the current directory contents into the container at /client
|
||||
|
||||
# React client build
|
||||
FROM base AS react-client
|
||||
WORKDIR /client
|
||||
COPY /client/ /client/
|
||||
# Set the memory limit for Node.js
|
||||
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||
# Build artifacts
|
||||
RUN npm run build
|
||||
|
||||
FROM node:19-alpine AS node-api
|
||||
# Node API setup
|
||||
FROM base AS node-api
|
||||
WORKDIR /api
|
||||
# copy package.json into the container at /api
|
||||
COPY /api/package*.json /api/
|
||||
# install dependencies
|
||||
RUN npm ci
|
||||
# Copy the current directory contents into the container at /api
|
||||
COPY /api/ /api/
|
||||
# Copy the client side code
|
||||
COPY --from=react-client /client/dist /client/dist
|
||||
# Make port 3080 available to the world outside this container
|
||||
EXPOSE 3080
|
||||
# Expose the server to 0.0.0.0
|
||||
ENV HOST=0.0.0.0
|
||||
# Run the app when the container launches
|
||||
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
|
||||
# Add your nginx.conf
|
||||
COPY /client/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY client/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue