Skip to content

Commit

Permalink
🐋 Feat: docker pre-built image by default (danny-avila#1860)
Browse files Browse the repository at this point in the history
* 🐋 Feat: docker pre-built image by default

* 🐋 Feat: docker LibreChat ports from .env
  • Loading branch information
fuegovic authored Feb 22, 2024
1 parent 1284466 commit 4012dea
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
11 changes: 9 additions & 2 deletions docker-compose.override.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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

# ---------------------------------------------------

Expand All @@ -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
Expand Down
7 changes: 2 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions docs/install/configuration/docker_override.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
26 changes: 12 additions & 14 deletions docs/install/installation/docker_compose_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
services:
api:
image: ghcr.io/danny-avila/librechat-dev:latest
```

- 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
```yaml
version: '3.4'
services:
api:
image: librechat
build:
context: .
target: node
```

### **[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)

Expand Down

0 comments on commit 4012dea

Please sign in to comment.