mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🐋 Feat: docker pre-built image by default (#1860)
* 🐋 Feat: docker pre-built image by default * 🐋 Feat: docker LibreChat ports from .env
This commit is contained in:
parent
128446601a
commit
4012dea4ab
4 changed files with 28 additions and 23 deletions
|
@ -11,13 +11,13 @@ version: '3.4'
|
|||
# WARNING: YOU CAN ONLY SPECIFY EVERY SERVICE NAME ONCE (api, mongodb, meilisearch, ...)
|
||||
# IF YOU WANT TO OVERRIDE MULTIPLE SETTINGS IN ONE SERVICE YOU WILL HAVE TO EDIT ACCORDINGLY
|
||||
|
||||
# EXAMPLE: if you want to use the config file and the latest docker image the result will be:
|
||||
# EXAMPLE: if you want to use the config file and the latest numbered release docker image the result will be:
|
||||
|
||||
# services:
|
||||
# api:
|
||||
# volumes:
|
||||
# - ./librechat.yaml:/app/librechat.yaml
|
||||
# image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
# image: ghcr.io/danny-avila/librechat:latest
|
||||
|
||||
# ---------------------------------------------------
|
||||
|
||||
|
@ -28,6 +28,13 @@ version: '3.4'
|
|||
# volumes:
|
||||
# - ./librechat.yaml:/app/librechat.yaml
|
||||
|
||||
# # LOCAL BUILD
|
||||
# api:
|
||||
# image: librechat
|
||||
# build:
|
||||
# context: .
|
||||
# target: node
|
||||
|
||||
# # BUILD FROM LATEST IMAGE
|
||||
# api:
|
||||
# image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
|
|
|
@ -7,13 +7,10 @@ services:
|
|||
api:
|
||||
container_name: LibreChat
|
||||
ports:
|
||||
- 3080:3080
|
||||
- "${PORT}:${PORT}"
|
||||
depends_on:
|
||||
- mongodb
|
||||
image: librechat
|
||||
build:
|
||||
context: .
|
||||
target: node
|
||||
image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
restart: always
|
||||
user: "${UID}:${GID}"
|
||||
extra_hosts:
|
||||
|
|
|
@ -49,7 +49,7 @@ services:
|
|||
- ./librechat.yaml:/app/librechat.yaml
|
||||
```
|
||||
|
||||
Or, if you want to use a prebuilt image for the `api` service, use the LibreChat config file, and use the older Mongo that doesn't requires AVX support, your `docker-compose.override.yml` might look like this:
|
||||
Or, if you want to locally build the image for the `api` service, use the LibreChat config file, and use the older Mongo that doesn't requires AVX support, your `docker-compose.override.yml` might look like this:
|
||||
|
||||
```yaml
|
||||
version: '3.4'
|
||||
|
@ -58,7 +58,10 @@ services:
|
|||
api:
|
||||
volumes:
|
||||
- ./librechat.yaml:/app/librechat.yaml
|
||||
image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
image: librechat
|
||||
build:
|
||||
context: .
|
||||
target: node
|
||||
|
||||
mongodb:
|
||||
image: mongo:4.4.18
|
||||
|
|
|
@ -117,7 +117,7 @@ For more info see:
|
|||
- MEILI_HOST=http://meilisearch:7700
|
||||
```
|
||||
|
||||
- If for some reason you're not able to build the app image, you can pull the latest image from **Dockerhub**.
|
||||
- If you want your docker install to reflect changes made to your local folder, you can build the image locally using this method:
|
||||
- Create a new file named `docker-compose.override.yml` in the same directory as your main `docker-compose.yml` with this content:
|
||||
|
||||
```yaml
|
||||
|
@ -125,16 +125,14 @@ version: '3.4'
|
|||
|
||||
services:
|
||||
api:
|
||||
image: ghcr.io/danny-avila/librechat-dev:latest
|
||||
image: librechat
|
||||
build:
|
||||
context: .
|
||||
target: node
|
||||
```
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
### **[LibreChat on Docker Hub](https://hub.docker.com/r/chatgptclone/app/tags)**
|
||||
|
||||
### **[Create a MongoDB database](../configuration/mongodb.md)** (Not required if you'd like to use the local database installed by Docker)
|
||||
|
||||
---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue