Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
fix(docker): handle .env file to read frontend vars during build easily (#513)
Danny Avila821b507e0e82
diff --git a/.dockerignore b/.dockerignoreindex 595651624a..51ef79175a 100644--- a/.dockerignore+++ b/.dockerignore@@ -1,4 +1,2 @@**/node_modules-api/.env-.envclient/dist/images\ No newline at end of filediff --git a/Dockerfile b/Dockerfileindex c62a2f5484..232bff081a 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,22 +1,19 @@# Base node imageFROM node:19-alpine AS nodeCOPY . /app+# Copy .env file+COPY .env .env# Install dependenciesWORKDIR /appRUN npm ci-# Frontend variables as build args-ARG VITE_APP_TITLE-ARG VITE_SHOW_GOOGLE_LOGIN_OPTION--# You will need to add your VITE variables to the docker-compose file-ENV VITE_APP_TITLE=$VITE_APP_TITLE-ENV VITE_SHOW_GOOGLE_LOGIN_OPTION=$VITE_SHOW_GOOGLE_LOGIN_OPTION-# React client buildENV NODE_OPTIONS="--max-old-space-size=2048"RUN npm run frontend+# Remove .env file after build+RUN rm .env+# Node API setupEXPOSE 3080ENV HOST=0.0.0.0diff --git a/docker-compose.yml b/docker-compose.ymlindex a97a992709..3697d2fd13 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -23,9 +23,6 @@ services:build:context: .target: node- args:- VITE_APP_TITLE: LibreChat # default, change to your desired app name- VITE_SHOW_GOOGLE_LOGIN_OPTION: false # default, change to true if you have google auth setup# image: chatgptclone/app:latest # Uncomment this & comment above to build from docker hub imagerestart: always# extra_hosts: # if you are running APIs on docker you need access to, you will need to uncomment this line and next