mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01: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
35 lines
878 B
Text
35 lines
878 B
Text
# ./Dockerfile
|
|
|
|
FROM node:19-alpine
|
|
WORKDIR /app
|
|
|
|
# Copy package.json files for client and api
|
|
COPY /client/package*.json /app/client/
|
|
COPY /api/package*.json /app/api/
|
|
COPY /package*.json /app/
|
|
|
|
# Install dependencies for both client and api
|
|
RUN npm ci
|
|
|
|
# Copy the current directory contents into the container
|
|
COPY /client/ /app/client/
|
|
COPY /api/ /app/api/
|
|
|
|
# Set the memory limit for Node.js
|
|
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
|
|
|
# Build artifacts for the client
|
|
RUN cd /app/client && npm run build
|
|
|
|
# Create the necessary directory and copy the client side code to the api directory
|
|
RUN mkdir -p /app/api/client && cp -R /app/client/dist /app/api/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
|
|
WORKDIR /app/api
|
|
CMD ["npm", "start"]
|