mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-06-15 23:43:06 +03:00
wip: testing leaner docker strategy and deployment compose file (#719)
* nginx setup * chore(dev-images.yml): update workflow trigger to push events on main branch chore(dev-images.yml): remove building and pushing of librechat-dev-client image chore(nginx.conf): comment out SSL configuration in nginx.conf chore(deploy-compose.yml): uncomment api build configuration in deploy-compose.yml chore(deploy-compose.yml): update client build configuration in deploy-compose.yml
This commit is contained in:
10
.github/workflows/dev-images.yml
vendored
10
.github/workflows/dev-images.yml
vendored
@@ -1,7 +1,9 @@
|
||||
name: Docker Dev Images Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -29,7 +31,6 @@ jobs:
|
||||
run: |
|
||||
cp .env.example .env
|
||||
docker build -f Dockerfile.multi --target api-build -t librechat-dev-api .
|
||||
docker build -f Dockerfile.multi --target prod-stage -t librechat-dev-client .
|
||||
docker build -f Dockerfile -t librechat-dev .
|
||||
|
||||
# Tag and push the images to GitHub Container Registry
|
||||
@@ -40,11 +41,6 @@ jobs:
|
||||
docker tag librechat-dev-api:latest ghcr.io/${{ github.repository_owner }}/librechat-dev-api:latest
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev-api:latest
|
||||
|
||||
docker tag librechat-dev-client:latest ghcr.io/${{ github.repository_owner }}/librechat-dev-client:${{ github.sha }}
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev-client:${{ github.sha }}
|
||||
docker tag librechat-dev-client:latest ghcr.io/${{ github.repository_owner }}/librechat-dev-client:latest
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev-client:latest
|
||||
|
||||
docker tag librechat-dev:latest ghcr.io/${{ github.repository_owner }}/librechat-dev:${{ github.sha }}
|
||||
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev:${{ github.sha }}
|
||||
docker tag librechat-dev:latest ghcr.io/${{ github.repository_owner }}/librechat-dev:latest
|
||||
|
||||
@@ -28,6 +28,5 @@ CMD ["node", "server/index.js"]
|
||||
|
||||
# Nginx setup
|
||||
FROM nginx:1.21.1-alpine AS prod-stage
|
||||
COPY --from=client-build /app/client/dist /usr/share/nginx/html
|
||||
COPY ./client/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
server {
|
||||
listen 80;
|
||||
# listen 443 ssl;
|
||||
|
||||
# ssl_certificate /etc/nginx/ssl/nginx.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/nginx.key;
|
||||
|
||||
server_name localhost;
|
||||
|
||||
location /api {
|
||||
@@ -7,7 +12,6 @@ server {
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
proxy_pass http://api:3080;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
api:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile.multi
|
||||
# target: api-build
|
||||
image: ghcr.io/danny-avila/librechat-dev-api:latest
|
||||
container_name: LibreChat-API
|
||||
ports:
|
||||
@@ -19,7 +23,11 @@ services:
|
||||
- MEILI_HOST=http://meilisearch:7700
|
||||
- MEILI_HTTP_ADDR=meilisearch:7700
|
||||
client:
|
||||
image: ghcr.io/danny-avila/librechat-dev-client:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.multi
|
||||
target: prod-stage
|
||||
container_name: LibreChat-NGINX
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
|
||||
Reference in New Issue
Block a user