mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🐳 docs: update to compose v2 (#1767)
This commit is contained in:
parent
a91042b6b9
commit
5ccdec730b
12 changed files with 45 additions and 45 deletions
|
@ -6,7 +6,7 @@ version: '3.4'
|
|||
|
||||
# # THEN UNCOMMENT ONLY THE SECTION OR SECTIONS CONTAINING THE CHANGES YOU WANT TO APPLY
|
||||
# # SAVE THIS FILE AS 'docker-compose.override.yaml'
|
||||
# # AND USE THE 'docker-compose build' & 'docker-compose up -d' COMMANDS AS YOU WOULD NORMALLY DO
|
||||
# # AND USE THE 'docker compose build' & 'docker compose up -d' COMMANDS AS YOU WOULD NORMALLY DO
|
||||
|
||||
# # USE LIBRECHAT CONFIG FILE
|
||||
# api:
|
||||
|
|
|
@ -126,7 +126,7 @@ SEARCH=true
|
|||
MEILI_HOST=meilisearch
|
||||
```
|
||||
|
||||
### 5. After everything file has been updated, run `docker-compose build` then `docker-compose up`
|
||||
### 5. After everything file has been updated, run `docker compose build` then `docker compose up`
|
||||
|
||||
|
||||
**NOTE: You may need to run these commands with sudo permissions.**
|
||||
|
|
|
@ -60,7 +60,7 @@ if you want, you can use NGINX, Apache, or any other proxy manager.
|
|||
|
||||
### Start NGINX Proxy Manager
|
||||
|
||||
- By executing: `docker-compose up -d`
|
||||
- By executing: `docker compose up -d`
|
||||
|
||||
### Login to NGINX Proxy Manager
|
||||
- **Important: You need to update the default credentials**
|
||||
|
|
|
@ -60,7 +60,7 @@ services:
|
|||
- Save the `docker-compose.override.yml` file and run the following command from the directory where your `docker-compose.yml` file is located to start Mongo-Express along with your other Docker services:
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
```
|
||||
This command will merge the `docker-compose.override.yml` with your `docker-compose.yml` and apply the configuration.
|
||||
|
||||
|
@ -74,14 +74,14 @@ If you wish to remove Mongo-Express from your Docker environment, follow these s
|
|||
|
||||
- Bring down the current Docker environment, which will stop and remove all running containers defined in the `docker-compose.yml` and `docker-compose.override.yml` files. Use the following command:
|
||||
```sh
|
||||
docker-compose down
|
||||
docker compose down
|
||||
```
|
||||
|
||||
- Now you can either rename or delete the `docker-compose.override.yml` file, which contains the Mongo Express configuration.
|
||||
|
||||
- Finally, bring your Docker environment back up, which will now exclude Mongo Express:
|
||||
```
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
> By following these steps, you will have successfully removed Mongo Express from your Docker environment. If you want to reinstate Mongo Express at a later time, you can either rename the backup file back to `docker-compose.override.yml` or recreate the original `docker-compose.override.yml` file with the Mongo Express configuration.
|
||||
|
|
|
@ -45,7 +45,7 @@ CHATGPT_REVERSE_PROXY=http://host.docker.internal:7999/backend-api/conversation
|
|||
From the Ninja directory, run the following command to launch the Docker containers:
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
---
|
||||
|
|
|
@ -68,8 +68,8 @@ Some users have reported an error after updating their docker containers.
|
|||
**(leave mongo intact to preserve your profiles and history)**
|
||||

|
||||
- Repeat the docker update process: 🚀
|
||||
- `docker-compose build`
|
||||
- `docker-compose up -d`
|
||||
- `docker compose build`
|
||||
- `docker compose up -d`
|
||||
|
||||
## v0.5.4
|
||||
Some changes were made in the .env file
|
||||
|
|
|
@ -66,7 +66,7 @@ The example config file has some options ready to go for Mistral AI and Openrout
|
|||
|
||||
For Docker, you need to make use of an [override file](./docker_override.md), named `docker-compose.override.yml`, to ensure the config file works for you.
|
||||
|
||||
- First, make sure your containers stop running with `docker-compose down`
|
||||
- First, make sure your containers stop running with `docker compose down`
|
||||
- Create or edit existing `docker-compose.override.yml` at the root of the project:
|
||||
|
||||
```yaml
|
||||
|
@ -83,7 +83,7 @@ services:
|
|||
|
||||
- Start docker again, and you should see your config file settings apply
|
||||
```bash
|
||||
docker-compose up # no need to rebuild
|
||||
docker compose up # no need to rebuild
|
||||
```
|
||||
|
||||
## Config Structure
|
||||
|
|
|
@ -6,7 +6,7 @@ weight: -9
|
|||
|
||||
# How to Use the Docker Compose Override File
|
||||
|
||||
In Docker Compose, an override file is a powerful feature that allows you to modify the default configuration provided by the main `docker-compose.yml` without the need to directly edit or duplicate the whole file. The primary use of the override file is for local development customizations, and Docker Compose merges the configurations of the `docker-compose.yml` and the `docker-compose.override.yml` files when you run `docker-compose up`.
|
||||
In Docker Compose, an override file is a powerful feature that allows you to modify the default configuration provided by the main `docker-compose.yml` without the need to directly edit or duplicate the whole file. The primary use of the override file is for local development customizations, and Docker Compose merges the configurations of the `docker-compose.yml` and the `docker-compose.override.yml` files when you run `docker compose up`.
|
||||
|
||||
Here's a quick guide on how to use the `docker-compose.override.yml`:
|
||||
|
||||
|
@ -66,14 +66,14 @@ services:
|
|||
To apply your configuration changes, simply run Docker Compose as usual. Docker Compose automatically takes into account both the `docker-compose.yml` and the `docker-compose.override.yml` files:
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
If you want to invoke a build with the changes before starting containers:
|
||||
|
||||
```bash
|
||||
docker-compose build
|
||||
docker-compose up -d
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Step 4: Verify the changes
|
||||
|
@ -110,8 +110,8 @@ Use of the `docker-compose.override.yml` file allows us to enable explicit authe
|
|||
First, we must stop the default containers from running, and only run the mongodb container.
|
||||
|
||||
```bash
|
||||
docker-compose down
|
||||
docker-compose up -d mongodb
|
||||
docker compose down
|
||||
docker compose up -d mongodb
|
||||
```
|
||||
|
||||
> Note: The `-d` flag detaches the current terminal instance as the container runs in the background. If you would like to see the mongodb log outputs, omit it and continue in a separate terminal.
|
||||
|
@ -205,7 +205,7 @@ admin> exit
|
|||
|
||||
And shut down the running container:
|
||||
```bash
|
||||
docker-compose down
|
||||
docker compose down
|
||||
```
|
||||
|
||||
### Step 2: Enabling Authentication and Creating a User with `readWrite` Access
|
||||
|
@ -226,7 +226,7 @@ services:
|
|||
After configuring the override file as above, run the mongodb container again:
|
||||
|
||||
```bash
|
||||
docker-compose up -d mongodb
|
||||
docker compose up -d mongodb
|
||||
```
|
||||
|
||||
And access mongosh as the admin user:
|
||||
|
@ -281,16 +281,16 @@ exit
|
|||
```
|
||||
|
||||
```bash
|
||||
docker-compose down
|
||||
docker compose down
|
||||
```
|
||||
|
||||
I had an issue where the newly created user would not persist after creating it. To solve this, I simply repeated the steps to ensure it was created. Here they are for your convenience:
|
||||
|
||||
```bash
|
||||
# ensure container is shut down
|
||||
docker-compose down
|
||||
docker compose down
|
||||
# start mongo container
|
||||
docker-compose up -d mongodb
|
||||
docker compose up -d mongodb
|
||||
# enter mongosh as admin
|
||||
docker exec -it chat-mongodb mongosh -u adminUser -p securePassword --authenticationDatabase admin
|
||||
|
||||
|
@ -328,7 +328,7 @@ services:
|
|||
command: mongod --auth
|
||||
```
|
||||
|
||||
You should now run `docker-compose up` successfully authenticated with read/write access to the LibreChat database
|
||||
You should now run `docker compose up` successfully authenticated with read/write access to the LibreChat database
|
||||
|
||||
Example successful connection:
|
||||
```bash
|
||||
|
@ -344,24 +344,24 @@ These are all the necessary commands if you'd like to run through these quickly
|
|||
|
||||
```bash
|
||||
# Step 1:
|
||||
docker-compose down
|
||||
docker-compose up -d mongodb
|
||||
docker compose down
|
||||
docker compose up -d mongodb
|
||||
docker exec -it chat-mongodb mongosh
|
||||
use admin
|
||||
db.createUser({ user: "adminUser", pwd: "securePassword", roles: ["userAdminAnyDatabase", "readWriteAnyDatabase"] })
|
||||
exit
|
||||
docker-compose down
|
||||
docker compose down
|
||||
# Step 2:
|
||||
# Edit override file with --auth flag
|
||||
docker-compose up -d mongodb
|
||||
docker compose up -d mongodb
|
||||
docker exec -it chat-mongodb mongosh -u adminUser -p securePassword --authenticationDatabase admin
|
||||
use LibreChat
|
||||
db.createUser({ user: 'user', pwd: 'userpasswd', roles: [ { role: "readWrite", db: "LibreChat" } ] });
|
||||
exit
|
||||
docker-compose down
|
||||
docker compose down
|
||||
# Step 3:
|
||||
# Edit override file with new connection string
|
||||
docker-compose up
|
||||
docker compose up
|
||||
```
|
||||
|
||||
## Example
|
||||
|
|
|
@ -212,7 +212,7 @@ DISCORD_CALLBACK_URL=/oauth/discord/callback
|
|||
|
||||
- Save the `.env` file
|
||||
|
||||
> Note: If using docker, run `docker-compose up -d` to apply the .env configuration changes
|
||||
> Note: If using docker, run `docker compose up -d` to apply the .env configuration changes
|
||||
|
||||
---
|
||||
|
||||
|
@ -292,7 +292,7 @@ FACEBOOK_CALLBACK_URL=/oauth/facebook/callback
|
|||
|
||||
- Save the `.env` file.
|
||||
|
||||
> Note: If using docker, run `docker-compose up -d` to apply the .env configuration changes
|
||||
> Note: If using docker, run `docker compose up -d` to apply the .env configuration changes
|
||||
|
||||
---
|
||||
|
||||
|
@ -354,7 +354,7 @@ GITHUB_CALLBACK_URL=/oauth/github/callback
|
|||
|
||||
- Save the `.env` file
|
||||
|
||||
> Note: If using docker, run `docker-compose up -d` to apply the .env configuration changes
|
||||
> Note: If using docker, run `docker compose up -d` to apply the .env configuration changes
|
||||
|
||||
---
|
||||
|
||||
|
@ -448,7 +448,7 @@ GOOGLE_CALLBACK_URL=/oauth/github/callback
|
|||
|
||||
- Save the `.env` file
|
||||
|
||||
> Note: If using docker, run `docker-compose up -d` to apply the .env configuration changes
|
||||
> Note: If using docker, run `docker compose up -d` to apply the .env configuration changes
|
||||
|
||||
---
|
||||
|
||||
|
@ -559,7 +559,7 @@ OPENID_CALLBACK_URL=/oauth/openid/callback
|
|||
```
|
||||
7. Save the .env file
|
||||
|
||||
> Note: If using docker, run `docker-compose up -d` to apply the .env configuration changes
|
||||
> Note: If using docker, run `docker compose up -d` to apply the .env configuration changes
|
||||
|
||||
|
||||
---
|
||||
|
@ -590,7 +590,7 @@ OPENID_CALLBACK_URL=/oauth/openid/callback # this should be the same for everyon
|
|||
```
|
||||
11. Save the .env file
|
||||
|
||||
> Note: If using docker, run `docker-compose up -d` to apply the .env configuration changes
|
||||
> Note: If using docker, run `docker compose up -d` to apply the .env configuration changes
|
||||
|
||||
|
||||
---
|
|
@ -44,7 +44,7 @@ Safely access and manage your MongoDB database using Mongo Express
|
|||
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`.
|
||||
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 MongoDB’s version to mongo:4.4.18 in docker-compose.yml, the most recent version compatible with
|
||||
|
||||
|
@ -55,8 +55,8 @@ The following commands will fetch the latest code of LibreChat and build a new d
|
|||
|
||||
```bash
|
||||
git pull
|
||||
docker-compose down
|
||||
docker-compose up --build
|
||||
docker compose down
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
If you're having issues running this command, you can try running what the script does manually:
|
||||
|
@ -65,7 +65,7 @@ Prefix commands with `sudo` according to your environment permissions.
|
|||
|
||||
```bash
|
||||
# Stop the container (if running)
|
||||
docker-compose down
|
||||
docker compose down
|
||||
# Switch to the repo's main branch
|
||||
git checkout main
|
||||
# Pull the latest changes to the main branch from Github
|
||||
|
@ -77,10 +77,10 @@ docker rmi librechat:latest
|
|||
# computer, also those not created by LibreChat!
|
||||
docker image prune -f
|
||||
# Building a new LibreChat image without cache
|
||||
docker-compose build --no-cache
|
||||
docker compose build --no-cache
|
||||
|
||||
# Start LibreChat
|
||||
docker-compose up
|
||||
docker compose up
|
||||
```
|
||||
|
||||
## Advanced Settings
|
||||
|
@ -128,7 +128,7 @@ services:
|
|||
image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
```
|
||||
|
||||
- Then use `docker-compose build` as you would normally
|
||||
- Then use `docker compose build` as you would normally
|
||||
|
||||
- **Note:** There are different Dockerhub images. the `librechat:latest` image is only updated with new release tags, so it may not have the latest changes to the main branch. To get the latest changes you can use `librechat-dev:latest` instead
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ In this video, you will learn how to install and run LibreChat, using Docker on
|
|||
- Install Docker: `sudo apt install docker.io && apt install docker-compose -y`
|
||||
- Enter the folder: `cd LibreChat`
|
||||
- Create the .env file: `cp .env.example .env`
|
||||
- Build the Docker image: `docker-compose build`
|
||||
- Start LibreChat: `docker-compose up -d`
|
||||
- Build the Docker image: `docker compose build`
|
||||
- Start LibreChat: `docker compose up -d`
|
||||
|
||||
Note: If you run the command on the same computer and want to access it, navigate to `localhost:3080`. You should see a login page where you can create or sign in to your account. Then you can choose an AI model and start chatting.
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ In this video we're going to install LibreChat on Windows 11 using Docker and Gi
|
|||
- `git clone https://github.com/danny-avila/LibreChat`
|
||||
- `cd LibreChat`
|
||||
- `copy .env.example .env`
|
||||
- `docker-compose up`
|
||||
- `docker compose up`
|
||||
- Visit http://localhost:3080/ to access LibreChat. Create an account and start chatting.
|
||||
|
||||
- [Manage Your MongoDB Database (optional)](../../features/manage_your_database.md)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue