From f32a0ff0552b1d1bf59e04f3c67c8495356f18d0 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Thu, 27 Jul 2023 16:33:28 -0400 Subject: [PATCH 1/2] chore(deploy-compose.yml): update API and client image references to use latest versions from ghcr.io feat(deploy-compose.yml): add NODE_ENV environment variable with value 'production' for API service --- deploy-compose.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/deploy-compose.yml b/deploy-compose.yml index f35f3637f41..9f4f71f416f 100644 --- a/deploy-compose.yml +++ b/deploy-compose.yml @@ -1,10 +1,7 @@ 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: - 9000:3080 @@ -17,14 +14,12 @@ services: - .env environment: - HOST=0.0.0.0 + - NODE_ENV=production - MONGO_URI=mongodb://mongodb:27017/LibreChat - MEILI_HOST=http://meilisearch:7700 - MEILI_HTTP_ADDR=meilisearch:7700 client: - build: - context: . - dockerfile: Dockerfile.multi - target: prod-stage + image: ghcr.io/danny-avila/librechat-dev-client:latest ports: - 80:80 - 443:443 From c6678d3fbf9824b64c246beaf351933e1a23e4a9 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Thu, 27 Jul 2023 16:46:28 -0400 Subject: [PATCH 2/2] chore(dev-images.yml): tag and push latest images to container registry chore(dev-images.yml): tag and push latest client image to container registry chore(dev-images.yml): tag and push latest dev image to container registry fix(Dockerfile.multi): fix CMD command to properly set NODE_ENV variable --- .github/workflows/dev-images.yml | 8 ++++++++ Dockerfile.multi | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-images.yml b/.github/workflows/dev-images.yml index f01fb606a7e..e6ac49ba7bb 100644 --- a/.github/workflows/dev-images.yml +++ b/.github/workflows/dev-images.yml @@ -40,7 +40,15 @@ jobs: run: | docker tag librechat-dev-api:latest ghcr.io/${{ github.repository_owner }}/librechat-dev-api:${{ github.sha }} docker push ghcr.io/${{ github.repository_owner }}/librechat-dev-api:${{ github.sha }} + 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 + docker push ghcr.io/${{ github.repository_owner }}/librechat-dev:latest diff --git a/Dockerfile.multi b/Dockerfile.multi index 753a5fd7fa4..ba814ea8499 100644 --- a/Dockerfile.multi +++ b/Dockerfile.multi @@ -24,7 +24,7 @@ FROM base AS api-build COPY --from=client-build /app/client/dist /app/client/dist EXPOSE 3080 ENV HOST=0.0.0.0 -CMD ["NODE_ENV=production", "node", "server/index.js"] +CMD ["node", "NODE_ENV=production", "server/index.js"] # Nginx setup FROM nginx:1.21.1-alpine AS prod-stage