Skip to content

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

docs(dev): update README.md with instructions for using single-compose.yml (#676)

Danny Avila2a2e6d99916a
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 78fa61f96a..044438cbf6 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -6,4 +6,12 @@ This directory contains files used for developer work
### eslintrc-stripped.js:
- alternate linting rules, used in development
### meilisearch.yml:
-- Dockerfile for building meilisearch image independently from project
\ No newline at end of file
+- Dockerfile for building meilisearch image independently from project
+### single-compose.yml:
+- Dockerfile for building app image without meilisearch and mongodb services
+ - This is useful for deploying on Google, Azure, etc., as a single, leaner container.
+- From root dir of the project, run `docker-compose -f ./docs/dev/single-compose.yml up --build`
+ - When you don't need to build, run `docker-compose -f ./docs/dev/single-compose.yml up`
+- This requires you use a MongoDB Atlas connection string for the `MONGO_URI` env var
+ - A URI string to a mongodb service accessible to your container is also possible.
+ - Remote Meilisearch may also be possible in the same manner, but is not tested.
\ No newline at end of file
diff --git a/docs/dev/single-compose.yml b/docs/dev/single-compose.yml
new file mode 100644
index 0000000000..6ba466be27
--- /dev/null
+++ b/docs/dev/single-compose.yml
@@ -0,0 +1,31 @@
+version: "3.4"
+
+services:
+ api:
+ container_name: LibreChat-App
+ ports:
+ - 3080:3080 # Change it to 9000:3080 to use nginx
+ image: librechat # Comment this & uncomment below to build from docker hub image
+ build: # ^------
+ context: ../../ # ^------
+ target: node # ^------v
+ # image: ghcr.io/danny-avila/librechat:latest # Uncomment this & comment above to build from docker hub image
+ restart: always
+ extra_hosts: # if you are running APIs on docker you need access to, you will need to uncomment this line and next
+ - "host.docker.internal:host-gateway"
+ env_file:
+ - ../../.env
+ environment:
+ - HOST=0.0.0.0
+ # it's best to set it in your .env file, but uncomment if you prefer it in compose file
+ # MONGO_URI=<Your MongoDB Atlas connection string here>
+ # - CHATGPT_REVERSE_PROXY=http://host.docker.internal:8080/api/conversation # if you are hosting your own chatgpt reverse proxy with docker
+ # - OPENAI_REVERSE_PROXY=http://host.docker.internal:8070/v1/chat/completions # if you are hosting your own chatgpt reverse proxy with docker
+ volumes:
+ - /app/client/node_modules
+ - ../../api:/app/api
+ - ../../.env:/app/.env
+ - ../../.env.development:/app/.env.development
+ - ../../.env.production:/app/.env.production
+ - /app/api/node_modules
+ - ../../images:/app/client/public/images