Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling Latest LibreChat Commits #3

Merged
merged 92 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
d2d9ac0
✨ feat: Add 'EnterToSend' Option & Update Br. Translation 🇧🇷 (#2413)
danny-avila Apr 14, 2024
2cc580b
*️⃣ refactor(DeleteButton): Conversation List Behavior after Deletion…
danny-avila Apr 14, 2024
fce7246
🔓 refactor: Make Image URL Security Optional (#2415)
danny-avila Apr 14, 2024
9d854da
🤖 feat: Gemini 1.5 Support (+Vertex AI) (#2383)
danny-avila Apr 16, 2024
bf4e64c
🪙 fix(Google): Update `maxOutputTokens` Condition (#2434)
danny-avila Apr 16, 2024
3c184e9
🛠️ fix: Ensure `imageOutputType` is Always Defined (#2438)
danny-avila Apr 16, 2024
0b7da72
🌍 : Update German Translations (#2409)
marlonka Apr 18, 2024
265abbc
⚙️ docs: Update .env.example (#2449)
fuegovic Apr 18, 2024
26ea990
📘 docs: update docker_compose_install.md (#2447)
fuegovic Apr 18, 2024
692ce3b
🛠️ fix: Merge Textarea Ref with Form for Simplified Handling (#2456)
danny-avila Apr 18, 2024
f406a85
🖥️ docs: env changes v0.6.10→v0.7.0+ (#2442)
fuegovic Apr 18, 2024
de3987c
🛂 refactor(openidStrategy): Use Strategy Functions for Avatars (#2467)
danny-avila Apr 19, 2024
3d1dec6
🧼 refactor(AppService): Consolidate Logic & Issue more Warnings (#2468)
danny-avila Apr 19, 2024
e6310c8
🤖 fix: Minor Assistants Endpoint Fixes (#2472)
danny-avila Apr 19, 2024
4196a86
🦙 doc update: llama3 (#2470)
fuegovic Apr 20, 2024
5d642d0
📙 docs: Remove duplicate information (#2451)
iamNoah1 Apr 20, 2024
8c22bb1
🛠️ fix(Azure/Assistants): Handle Long Domain Names & Other Minor chor…
danny-avila Apr 20, 2024
6db9197
🎨 style: update CodeSherpa icon (#2417)
Passerby1011 Apr 20, 2024
c937b8c
🧑‍💻 refactor: Display Client-facing Errors (#2476)
danny-avila Apr 21, 2024
3bfd185
⚡ feat: Added PWA Setup & Manual Chunks via Vite (#2477)
danny-avila Apr 21, 2024
c96f067
🔧 fix: Resolve Proper Dependencies to fix Application Error (#2488)
danny-avila Apr 22, 2024
738207d
✏️docs: remove "copilot-gpt4-service" (#2491)
fuegovic Apr 22, 2024
f94a782
💻 fix(client): Allow Code Filetypes and Suppress Known Vite Warnings …
danny-avila Apr 23, 2024
199f9f3
🐋 fix(Dockerfile.multi): Resolve OpenAI SDK @ Latest for Assistants v1
danny-avila Apr 23, 2024
4d05e5b
👟 style: WrenchIcon and ImageGen SVG Animations (#2382)
walbercardoso Apr 23, 2024
0ae98ff
🧪 ci: Add `.env.test` for `backend-review.yml` (#2501)
danny-avila Apr 23, 2024
3df4fac
✨ v0.7.1 (#2502)
danny-avila Apr 23, 2024
cdab1e9
🔒 fix: package-lock file for cross-compatibility (#2515)
danny-avila Apr 24, 2024
75da75b
🛂 feat(oauth): add domain restriction on social login (#2512)
mbreton Apr 24, 2024
667f5f9
👤 fix: Use `user?.username` if `user?.name` is undefined (#2511)
ilsubyeega Apr 24, 2024
bde6bb0
🔀 fix: Remove use of Mongo Transactions (#2525)
danny-avila Apr 24, 2024
ca9a0fe
🥧 feat: APIpie support (#2524)
fuegovic Apr 25, 2024
4121818
✍️ fix(useTextarea): Rich Text Format paste from MS Word (#2530)
danny-avila Apr 25, 2024
099aa9d
✋ feat: Stop Sequences for Conversations & Presets (#2536)
danny-avila Apr 25, 2024
11d5e23
🧪 refactor(isDomainAllowed): change directory, add tests (#2539)
berry-13 Apr 25, 2024
3ccff19
🌍: Update Japanese translation (#2519)
k-ishii1020 Apr 25, 2024
5b5f9b9
🐋 refactor: Update `docker-compose.yml` (#2507)
kneelesh48 Apr 26, 2024
4d0806d
📋 refactor: allow paste in confirm field when resetting passwords (#2…
dahlo Apr 26, 2024
2720327
👩‍💻 fix: Minor UI fixes (#2548)
danny-avila Apr 26, 2024
144fd5f
⚙️ docs: update dotenv.md (#2551)
fuegovic Apr 26, 2024
8a78500
🚅 docs: update LiteLLM config with more models (#2553)
ventz Apr 27, 2024
63ef15a
🦙 feat: Fetch list of Ollama Models (#2565)
danny-avila Apr 27, 2024
039c7ae
📄 docs: update GOOGLE_MODELS in .env.example (#2506)
kneelesh48 Apr 27, 2024
463ca5d
📄 docs: Update apipie fetch.py in ai_endpoints.md (#2547)
kneelesh48 Apr 27, 2024
ba4fa61
🦙 docs: fix litellm.md (#2566)
fuegovic Apr 28, 2024
a5cac03
🚅 docs: load LiteLLM into LibreChat (#2573)
ventz Apr 29, 2024
0e50c07
🤖 feat: Model Specs & Save Tools per Convo/Preset (#2578)
danny-avila May 1, 2024
d21a056
🍎 feat: Apple MLX as Known Endpoint (#2580)
Extremys May 1, 2024
3b44741
🚑 fix(dialog): showCloseButton Prop Warning in DialogContent Componen…
ohneda May 2, 2024
ab6fbe4
📥 feat: Import Conversations from LibreChat, ChatGPT, Chatbot UI (#2355)
DenisPalnitsky May 2, 2024
5d3c90b
📦 chore: update package.json/package-lock.json (#2600)
danny-avila May 2, 2024
a0288f1
🧾 docs: Fix Typo in `librechat.example.yaml` (#2606)
kaikreuzer May 2, 2024
c8bacea
🐛 fix: Prevent Empty File Uploads & Assistants Fixes (#2611)
danny-avila May 3, 2024
25fceb7
🌿 feat: Fork Messages/Conversations (#2617)
danny-avila May 5, 2024
110c053
Update README.md
danny-avila May 5, 2024
b9bcaee
📝 docs: update README.md
danny-avila May 5, 2024
446ffe0
📝 docs: update README.md
danny-avila May 5, 2024
b77bd19
🎨 style(Fork): update light/dark theme (#2621)
berry-13 May 5, 2024
2aec4a6
🔄 refactor: improved RAG animations/messages (#2616)
berry-13 May 5, 2024
436f719
🌍: Update Italian translation (#2622)
berry-13 May 6, 2024
89b1e33
🚀feat: Archive conversations (#2590)
ohneda May 7, 2024
b6d6343
📧 feat: Mention "@" Command Popover (#2635)
danny-avila May 7, 2024
3c5fa40
📶 fix: Mobile Stylings (#2639)
danny-avila May 8, 2024
c94278b
🦙 feat: Ollama Vision Support (#2643)
danny-avila May 9, 2024
b6d1f5f
🎨 style: Convo fade effect (#2642)
walbercardoso May 9, 2024
5293b73
🤖 feat(google): Add safety settings configuration (#2644)
danny-avila May 9, 2024
6ba7f60
🪙 feat: Configure Max Context and Output Tokens (#2648)
danny-avila May 9, 2024
83bae9e
🔧 fix: android keyboard `@` popover issue (#2647)
berry-13 May 9, 2024
d73ea8e
🤗 feat: Known Endpoints: HuggingFace (#2646)
fuegovic May 9, 2024
8f20fb2
🪟 fix+feat: General UI Enhancements (#2619)
techwithanirudh May 9, 2024
98c96cd
🦙 fix: Ollama System Message order (#2655)
danny-avila May 10, 2024
2b37a44
🔧 fix: Preset Dialog Styling and Values (#2657)
danny-avila May 10, 2024
27e7621
🪟 fix: Windows Vite Build Issue (#2663)
danny-avila May 10, 2024
9780097
📝 docs(ai_endpoints): update HF key link (#2664)
berry-13 May 10, 2024
2ec821e
🌍 : Updated Translations & AI Generation Scripts (#2666)
danny-avila May 10, 2024
4a32d74
✨ v0.7.2 (#2667)
danny-avila May 10, 2024
a4de635
🎨 style(MentionItem): update hover color (#2670)
berry-13 May 12, 2024
bcdddae
🎨 style(MentionItem): update active bg-color (#2675)
danny-avila May 12, 2024
c83d9d6
🧹 chore(/config/): add tsconfig.json & linting (#2680)
danny-avila May 12, 2024
8989916
👮 fix(enforceModelSpec): handle nested objects (#2681)
danny-avila May 12, 2024
6fc664e
⚙️ feat: `includedTools` and script changes (#2690)
danny-avila May 13, 2024
3816219
🧹 chore: remove old docs (#2684)
fuegovic May 13, 2024
df6183d
🐋 refactor(docker-compose): use "HOST" in `ports` field (#2654)
nidasfly May 13, 2024
4ffc141
Revert "🐋 refactor(docker-compose): use "HOST" in `ports` field (#2654)"
danny-avila May 13, 2024
a0d1e2a
🪶 docs: Update README.md Icon
danny-avila May 13, 2024
5920672
🐋 ci: create smaller Docker images (#2691)
derkoe May 13, 2024
638ac5b
🚀 feat: gpt-4o (#2692)
danny-avila May 13, 2024
e42709b
🔍 feat: Show Messages from Search Result (#2699)
danny-avila May 14, 2024
94eeec3
🔀 fix: Address Convo/Preset Switching Issues (#2709)
danny-avila May 14, 2024
64bf080
🚑 fix: Display Error Message when API Connection fails during Chat (#…
ohneda May 14, 2024
fc9368e
⚡ feat: Gemini-1.5 Flash, `gpt-4o` imports, `modelSpec` greeting fix …
danny-avila May 15, 2024
4a5d06a
❇️ style(ModelSpecs): optimize for Long/Chinese name and mobile styli…
danny-avila May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 35 additions & 16 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
# LibreChat Configuration #
#=====================================================================#
# Please refer to the reference documentation for assistance #
# with configuring your LibreChat environment. The guide is #
# available both online and within your local LibreChat #
# directory: #
# Online: https://docs.librechat.ai/install/configuration/dotenv.html #
# Locally: ./docs/install/configuration/dotenv.md #
# with configuring your LibreChat environment. #
# #
# https://www.librechat.ai/docs/configuration/dotenv #
#=====================================================================#

#==================================================#
Expand Down Expand Up @@ -62,15 +60,17 @@ PROXY=
#===================================#
# Known Endpoints - librechat.yaml #
#===================================#
# https://docs.librechat.ai/install/configuration/ai_endpoints.html
# https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints

# GROQ_API_KEY=
# SHUTTLEAI_KEY=
# OPENROUTER_KEY=
# MISTRAL_API_KEY=
# ANYSCALE_API_KEY=
# APIPIE_API_KEY=
# FIREWORKS_API_KEY=
# GROQ_API_KEY=
# HUGGINGFACE_TOKEN=
# MISTRAL_API_KEY=
# OPENROUTER_KEY=
# PERPLEXITY_API_KEY=
# SHUTTLEAI_API_KEY=
# TOGETHERAI_API_KEY=

#============#
Expand Down Expand Up @@ -113,15 +113,34 @@ BINGAI_TOKEN=user_provided
#============#

GOOGLE_KEY=user_provided
# GOOGLE_MODELS=gemini-pro,gemini-pro-vision,chat-bison,chat-bison-32k,codechat-bison,codechat-bison-32k,text-bison,text-bison-32k,text-unicorn,code-gecko,code-bison,code-bison-32k
# GOOGLE_REVERSE_PROXY=

# Gemini API
# GOOGLE_MODELS=gemini-1.5-flash-latest,gemini-1.0-pro,gemini-1.0-pro-001,gemini-1.0-pro-latest,gemini-1.0-pro-vision-latest,gemini-1.5-pro-latest,gemini-pro,gemini-pro-vision

# Vertex AI
# GOOGLE_MODELS=gemini-1.5-flash-preview-0514,gemini-1.5-pro-preview-0409,gemini-1.0-pro-vision-001,gemini-pro,gemini-pro-vision,chat-bison,chat-bison-32k,codechat-bison,codechat-bison-32k,text-bison,text-bison-32k,text-unicorn,code-gecko,code-bison,code-bison-32k

# Google Gemini Safety Settings
# NOTE (Vertex AI): You do not have access to the BLOCK_NONE setting by default.
# To use this restricted HarmBlockThreshold setting, you will need to either:
#
# (a) Get access through an allowlist via your Google account team
# (b) Switch your account type to monthly invoiced billing following this instruction:
# https://cloud.google.com/billing/docs/how-to/invoiced-billing
#
# GOOGLE_SAFETY_SEXUALLY_EXPLICIT=BLOCK_ONLY_HIGH
# GOOGLE_SAFETY_HATE_SPEECH=BLOCK_ONLY_HIGH
# GOOGLE_SAFETY_HARASSMENT=BLOCK_ONLY_HIGH
# GOOGLE_SAFETY_DANGEROUS_CONTENT=BLOCK_ONLY_HIGH


#============#
# OpenAI #
#============#

OPENAI_API_KEY=user_provided
# OPENAI_MODELS=gpt-3.5-turbo-0125,gpt-3.5-turbo-0301,gpt-3.5-turbo,gpt-4,gpt-4-0613,gpt-4-vision-preview,gpt-3.5-turbo-0613,gpt-3.5-turbo-16k-0613,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview,gpt-3.5-turbo-1106,gpt-3.5-turbo-instruct,gpt-3.5-turbo-instruct-0914,gpt-3.5-turbo-16k
# OPENAI_MODELS=gpt-4o,gpt-3.5-turbo-0125,gpt-3.5-turbo-0301,gpt-3.5-turbo,gpt-4,gpt-4-0613,gpt-4-vision-preview,gpt-3.5-turbo-0613,gpt-3.5-turbo-16k-0613,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview,gpt-3.5-turbo-1106,gpt-3.5-turbo-instruct,gpt-3.5-turbo-instruct-0914,gpt-3.5-turbo-16k

DEBUG_OPENAI=false

Expand All @@ -143,19 +162,19 @@ DEBUG_OPENAI=false

ASSISTANTS_API_KEY=user_provided
# ASSISTANTS_BASE_URL=
# ASSISTANTS_MODELS=gpt-3.5-turbo-0125,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-16k,gpt-3.5-turbo,gpt-4,gpt-4-0314,gpt-4-32k-0314,gpt-4-0613,gpt-3.5-turbo-0613,gpt-3.5-turbo-1106,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview
# ASSISTANTS_MODELS=gpt-4o,gpt-3.5-turbo-0125,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-16k,gpt-3.5-turbo,gpt-4,gpt-4-0314,gpt-4-32k-0314,gpt-4-0613,gpt-3.5-turbo-0613,gpt-3.5-turbo-1106,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview

#============#
# OpenRouter #
#============#

# !!!Warning: Use the variable above instead of this one. Using this one will override the OpenAI endpoint
# OPENROUTER_API_KEY=

#============#
# Plugins #
#============#

# PLUGIN_MODELS=gpt-4,gpt-4-turbo-preview,gpt-4-0125-preview,gpt-4-1106-preview,gpt-4-0613,gpt-3.5-turbo,gpt-3.5-turbo-0125,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613
# PLUGIN_MODELS=gpt-4o,gpt-4,gpt-4-turbo-preview,gpt-4-0125-preview,gpt-4-1106-preview,gpt-4-0613,gpt-3.5-turbo,gpt-3.5-turbo-0125,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613

DEBUG_PLUGINS=true

Expand Down Expand Up @@ -192,7 +211,7 @@ AZURE_AI_SEARCH_SEARCH_OPTION_SELECT=

# Google
#-----------------
GOOGLE_API_KEY=
GOOGLE_SEARCH_API_KEY=
GOOGLE_CSE_ID=

# SerpAPI
Expand Down
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ module.exports = {
},
],
},
{
files: './config/translations/**/*.ts',
parser: '@typescript-eslint/parser',
parserOptions: {
project: './config/translations/tsconfig.json',
},
},
{
files: ['./packages/data-provider/specs/**/*.ts'],
parserOptions: {
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/CODE_OF_CONDUCT.md)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/QUESTION.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/CODE_OF_CONDUCT.md)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/danny-avila/LibreChat/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
9 changes: 5 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Pull Request Template

⚠️ Before Submitting a PR, Please Review:
- Please ensure that you have thoroughly read and understood the [Contributing Docs](https://github.com/danny-avila/LibreChat/blob/main/.github/CONTRIBUTING.md) before submitting your Pull Request.

### ⚠️ Before Submitting a PR, read the [Contributing Docs](https://github.com/danny-avila/LibreChat/blob/main/.github/CONTRIBUTING.md) in full!
⚠️ Documentation Updates Notice:
- Kindly note that documentation updates are managed in this repository: [librechat.ai](https://github.com/LibreChat-AI/librechat.ai)

## Summary

Expand All @@ -16,8 +19,6 @@ Please delete any irrelevant options.
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Translation update
- [ ] Documentation update


## Testing

Expand All @@ -37,4 +38,4 @@ Please delete any irrelevant options.
- [ ] I have written tests demonstrating that my changes are effective or that my feature works
- [ ] Local unit tests pass with my changes
- [ ] Any changes dependent on mine have been merged and published in downstream modules.
- [ ] New documents have been locally validated with mkdocs
- [ ] A pull request for updating the documentation has been submitted.
5 changes: 4 additions & 1 deletion .github/workflows/backend-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
exit 1
fi

- name: Prepare .env.test file
run: cp api/test/.env.test.example api/test/.env.test

- name: Run unit tests
run: cd api && npm run test:ci

Expand All @@ -60,4 +63,4 @@ jobs:
- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
eslint: true
36 changes: 27 additions & 9 deletions .github/workflows/frontend-review.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#github action to run unit tests for frontend with jest
name: Frontend Unit Tests

on:
# push:
# branches:
# - main
# - dev
# - release/*
pull_request:
branches:
- main
Expand All @@ -14,9 +9,10 @@ on:
paths:
- 'client/**'
- 'packages/**'

jobs:
tests_frontend:
name: Run frontend unit tests
tests_frontend_ubuntu:
name: Run frontend unit tests on Ubuntu
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
Expand All @@ -35,4 +31,26 @@ jobs:

- name: Run unit tests
run: npm run test:ci --verbose
working-directory: client
working-directory: client

tests_frontend_windows:
name: Run frontend unit tests on Windows
timeout-minutes: 60
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build Client
run: npm run frontend:ci

- name: Run unit tests
run: npm run test:ci --verbose
working-directory: client
27 changes: 0 additions & 27 deletions .github/workflows/mkdocs.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# translation services
config/translations/stores/*
client/src/localization/languages/*_missing_keys.json

# Compiled Dirs (http://nodejs.org/api/addons.html)
build/
dist/
Expand Down Expand Up @@ -69,13 +73,16 @@ src/style - official.css
/playwright/.cache/
.DS_Store
*.code-workspace
.idx
monospace.json
.idea
*.iml
*.pem
config.local.ts
**/storageState.json
junit.xml
**/.venv/
**/venv/

# docker override file
docker-compose.override.yaml
Expand Down
32 changes: 15 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# v0.7.0
# v0.7.2

# Base node image
FROM node:18-alpine3.18 AS node
FROM node:20-alpine AS node

RUN apk add g++ make py3-pip
RUN npm install -g node-gyp
RUN apk --no-cache add curl

RUN mkdir -p /app && chown node:node /app
Expand All @@ -14,20 +12,20 @@ USER node

COPY --chown=node:node . .

# Allow mounting of these files, which have no default
# values.
RUN touch .env
RUN npm config set fetch-retry-maxtimeout 600000
RUN npm config set fetch-retries 5
RUN npm config set fetch-retry-mintimeout 15000
RUN npm install --no-audit
RUN \
# Allow mounting of these files, which have no default
touch .env ; \
# Create directories for the volumes to inherit the correct permissions
mkdir -p /app/client/public/images /app/api/logs ; \
npm config set fetch-retry-maxtimeout 600000 ; \
npm config set fetch-retries 5 ; \
npm config set fetch-retry-mintimeout 15000 ; \
npm install --no-audit; \
# React client build
NODE_OPTIONS="--max-old-space-size=2048" npm run frontend; \
npm prune --production; \
npm cache clean --force

# React client build
ENV NODE_OPTIONS="--max-old-space-size=2048"
RUN npm run frontend

# Create directories for the volumes to inherit
# the correct permissions
RUN mkdir -p /app/client/public/images /app/api/logs

# Node API setup
Expand Down
19 changes: 9 additions & 10 deletions Dockerfile.multi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v0.7.0
# v0.7.2

# Build API, Client and Data Provider
FROM node:20-alpine AS base
Expand All @@ -7,32 +7,31 @@ FROM node:20-alpine AS base
FROM base AS data-provider-build
WORKDIR /app/packages/data-provider
COPY ./packages/data-provider ./
RUN npm install
RUN npm install; npm cache clean --force
RUN npm run build
RUN npm prune --production

# React client build
FROM data-provider-build AS client-build
FROM base AS client-build
WORKDIR /app/client
COPY ./client/package*.json ./
# Copy data-provider to client's node_modules
RUN mkdir -p /app/client/node_modules/librechat-data-provider/
RUN cp -R /app/packages/data-provider/* /app/client/node_modules/librechat-data-provider/
RUN npm install
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/ ./
ENV NODE_OPTIONS="--max-old-space-size=2048"
RUN npm run build

# Node API setup
FROM data-provider-build AS api-build
FROM base AS api-build
WORKDIR /app/api
COPY api/package*.json ./
COPY api/ ./
# Copy helper scripts
COPY config/ ./
# Copy data-provider to API's node_modules
RUN mkdir -p /app/api/node_modules/librechat-data-provider/
RUN cp -R /app/packages/data-provider/* /app/api/node_modules/librechat-data-provider/
RUN npm install
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
EXPOSE 3080
ENV HOST=0.0.0.0
Expand Down
Loading