🐋 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:
Fuegovic 2024-02-22 13:20:27 -05:00 committed by GitHub
parent 128446601a
commit 4012dea4ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 23 deletions

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -117,23 +117,21 @@ 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**.
- Create a new file named `docker-compose.override.yml` in the same directory as your main `docker-compose.yml` with this content:
- 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
version: '3.4'
```yaml
version: '3.4'
services:
api:
image: ghcr.io/danny-avila/librechat-dev:latest
```
services:
api:
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)**
- Then use `docker compose build` as you would normally
### **[Create a MongoDB database](../configuration/mongodb.md)** (Not required if you'd like to use the local database installed by Docker)