forked from danny-avila/LibreChat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
368 changed files
with
32,452 additions
and
9,885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,4 +53,4 @@ jobs: | |
|
||
- name: Run unit tests | ||
run: npm run test:ci --verbose | ||
working-directory: client | ||
working-directory: client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# v0.7.4 | ||
# v0.7.5-rc1 | ||
|
||
# Base node image | ||
FROM node:20-alpine AS node | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
# v0.7.4 | ||
# Dockerfile.multi | ||
# v0.7.5-rc1 | ||
|
||
# Build API, Client and Data Provider | ||
# Base for all builds | ||
FROM node:20-alpine AS base | ||
WORKDIR /app | ||
RUN apk --no-cache add curl | ||
RUN npm config set fetch-retry-maxtimeout 600000 && \ | ||
npm config set fetch-retries 5 && \ | ||
npm config set fetch-retry-mintimeout 15000 | ||
COPY package*.json ./ | ||
COPY packages/data-provider/package*.json ./packages/data-provider/ | ||
COPY client/package*.json ./client/ | ||
COPY api/package*.json ./api/ | ||
RUN npm ci | ||
|
||
# Build data-provider | ||
FROM base AS data-provider-build | ||
WORKDIR /app/packages/data-provider | ||
COPY ./packages/data-provider ./ | ||
RUN npm install; npm cache clean --force | ||
COPY packages/data-provider ./ | ||
RUN npm run build | ||
RUN npm prune --production | ||
|
||
# React client build | ||
# Client build | ||
FROM base AS client-build | ||
WORKDIR /app/client | ||
COPY ./client/package*.json ./ | ||
# Copy data-provider to client's node_modules | ||
COPY --from=data-provider-build /app/packages/data-provider/ /app/client/node_modules/librechat-data-provider/ | ||
RUN npm install; npm cache clean --force | ||
COPY ./client/ ./ | ||
COPY client ./ | ||
COPY --from=data-provider-build /app/packages/data-provider/dist /app/packages/data-provider/dist | ||
ENV NODE_OPTIONS="--max-old-space-size=2048" | ||
RUN npm run build | ||
RUN npm prune --production | ||
|
||
# Node API setup | ||
# API setup (including client dist) | ||
FROM base AS api-build | ||
WORKDIR /app | ||
COPY api ./api | ||
COPY config ./config | ||
COPY --from=data-provider-build /app/packages/data-provider/dist ./packages/data-provider/dist | ||
COPY --from=client-build /app/client/dist ./client/dist | ||
WORKDIR /app/api | ||
COPY api/package*.json ./ | ||
COPY api/ ./ | ||
# Copy helper scripts | ||
COPY config/ ./ | ||
# Copy data-provider to API's node_modules | ||
COPY --from=data-provider-build /app/packages/data-provider/ /app/api/node_modules/librechat-data-provider/ | ||
RUN npm install --include prod; npm cache clean --force | ||
COPY --from=client-build /app/client/dist /app/client/dist | ||
RUN npm prune --production | ||
EXPOSE 3080 | ||
ENV HOST=0.0.0.0 | ||
CMD ["node", "server/index.js"] | ||
|
||
# Nginx setup | ||
FROM nginx:1.27.0-alpine AS prod-stage | ||
COPY ./client/nginx.conf /etc/nginx/conf.d/default.conf | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.