docs: update Docker installation and configuration guide (#601)

This PR updates the Docker installation and configuration instructions for LibreChat to improve clarity and readability. The changes include restructuring the document and refining certain parts for smoother understanding. Here's a summary of the modifications:

- The installation and configuration steps have been reorganized into separate sections for better organization.
- The LibreChat configuration section provides clearer instructions for updating the credentials in the `docker-compose.yml` file and setting up the `.env` file.
This commit is contained in:
Youngwook Kim 2023-07-08 03:04:24 +09:00 committed by GitHub
parent a64342f515
commit 6efb5bd88e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,33 +1,49 @@
# Docker
# Docker Installation Guide
Docker installation is recommended for most use cases. It's the easiest, simplest, and most reliable method to get started.
- **Clone/download** the repo down where desired
## Installation and Configuration
### Preparation
Start by cloning the repository or downloading it to your desired location:
```bash
git clone https://github.com/danny-avila/LibreChat.git
```
- Install **Docker:** [Docker Desktop](https://www.docker.com/products/docker-desktop/) is recommended for managing your docker container
- **Edit** the credentials you see in `docker-compose.yml` under api service as needed
- **Provide** all necessary credentials in the /.env file before the next step
- See my notes below for specific instructions on some of the configuration
- Docker will read this env file. See the `.env.example` file for reference
- **Run** `docker-compose up` to start the app
- Note: MongoDB does not support older ARM CPUs like those found in Raspberry Pis. However, you can make it work by setting MongoDBs version to mongo:4.4.18 in docker-compose.yml, the most recent version compatible with
- **That's it!** If you need more detailed information on configuring your compose file, see my notes below.
## [Get Your API keys and Tokens](apis_and_tokens.md) (Required)
- You must set up at least one of these tokens or APIs to run the app.
### Docker Installation
Install Docker on your system. [Docker Desktop](https://www.docker.com/products/docker-desktop/) is recommended for managing your Docker containers.
## [User/Auth System](../install/user_auth_system.md) (Optional)
- How to set up the user/auth system and Google login.
### LibreChat Configuration
Before running LibreChat with Docker, you need to configure some settings:
## Update
- Edit the credentials you see in `docker-compose.yml` under the API service as needed.
- See my notes below for specific instructions on some of the configuration
- Provide all necessary credentials in the `.env` file before the next step.
- Docker will read this env file. See the `.env.example` file for reference.
#### [API Keys and Tokens Setup](apis_and_tokens.md) (Required)
You must set up at least one of these tokens or APIs to run the app.
#### [User Authentication System Setup](../install/user_auth_system.md) (Optional)
How to set up the user/auth system and Google login.
### Running LibreChat
Once you have completed all the setup, you can start the LibreChat application by running the command `docker-compose up` in your terminal. After running this command, you can access the LibreChat application at `http://localhost:3080`.
**Note:** MongoDB does not support older ARM CPUs like those found in Raspberry Pis. However, you can make it work by setting MongoDBs version to mongo:4.4.18 in docker-compose.yml, the most recent version compatible with
That's it! If you need more detailed information on configuring your compose file, see my notes below.
## Updating LibreChat
To update LibreChat. enter these commands one after the other from the root dir:
- git pull
- docker-compose build
- docker-compose up
## Config notes for docker-compose.yml file
## Advanced Settings
### Config notes for docker-compose.yml file
- Any environment variables set in your compose file will override variables with the same name in your .env file. Note that the following variables are necessary to include in the compose file so they work in the docker environment, so they are included for you.
```yaml
@ -66,8 +82,8 @@ To update LibreChat. enter these commands one after the other from the root dir:
```
- Comment this line in (remove the `#` key)
```yaml
# image: chatgptclone/app:latest # Uncomment this & comment above to build from docker hub image
```
@ -83,7 +99,7 @@ To update LibreChat. enter these commands one after the other from the root dir:
- Usually, these are reverse proxies, which you can set as shown below under `environment:`
```yaml
```yaml
environment:
- HOST=0.0.0.0
- MONGO_URI=mongodb://mongodb:27017/LibreChat
@ -93,8 +109,8 @@ To update LibreChat. enter these commands one after the other from the root dir:
### **[LibreChat on Docker Hub](https://hub.docker.com/r/chatgptclone/app/tags)**
## **Create a MongoDB database** (Not required if you'd like to use the local database installed by Docker)
### **Create a MongoDB database** (Not required if you'd like to use the local database installed by Docker)
Navigate to https://www.mongodb.com/ and Sign In or Create an account
- Create a new project
@ -108,4 +124,4 @@ Navigate to https://www.mongodb.com/ and Sign In or Create an account
---
### Note: If you're still having trouble, before creating a new issue, please search for similar ones on our [#issues thread on our discord](https://discord.gg/weqZFtD9C4) or our [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) on our Discussions page. If you don't find a relevant issue, feel free to create a new one and provide as much detail as possible.
### Note: If you're still having trouble, before creating a new issue, please search for similar ones on our [#issues thread on our discord](https://discord.gg/weqZFtD9C4) or our [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) on our Discussions page. If you don't find a relevant issue, feel free to create a new one and provide as much detail as possible.