mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
wip: testing dev image workflows and deployment setup (#716)
* 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 * 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
This commit is contained in:
parent
32281d1b8d
commit
2a6e000217
3 changed files with 12 additions and 9 deletions
8
.github/workflows/dev-images.yml
vendored
8
.github/workflows/dev-images.yml
vendored
|
|
@ -40,7 +40,15 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker tag librechat-dev-api:latest ghcr.io/${{ github.repository_owner }}/librechat-dev-api:${{ github.sha }}
|
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 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 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 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 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 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
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ FROM base AS api-build
|
||||||
COPY --from=client-build /app/client/dist /app/client/dist
|
COPY --from=client-build /app/client/dist /app/client/dist
|
||||||
EXPOSE 3080
|
EXPOSE 3080
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
CMD ["NODE_ENV=production", "node", "server/index.js"]
|
CMD ["node", "NODE_ENV=production", "server/index.js"]
|
||||||
|
|
||||||
# Nginx setup
|
# Nginx setup
|
||||||
FROM nginx:1.21.1-alpine AS prod-stage
|
FROM nginx:1.21.1-alpine AS prod-stage
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
build:
|
image: ghcr.io/danny-avila/librechat-dev-api:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile.multi
|
|
||||||
target: api-build
|
|
||||||
container_name: LibreChat-API
|
container_name: LibreChat-API
|
||||||
ports:
|
ports:
|
||||||
- 9000:3080
|
- 9000:3080
|
||||||
|
|
@ -17,14 +14,12 @@ services:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
- HOST=0.0.0.0
|
- HOST=0.0.0.0
|
||||||
|
- NODE_ENV=production
|
||||||
- MONGO_URI=mongodb://mongodb:27017/LibreChat
|
- MONGO_URI=mongodb://mongodb:27017/LibreChat
|
||||||
- MEILI_HOST=http://meilisearch:7700
|
- MEILI_HOST=http://meilisearch:7700
|
||||||
- MEILI_HTTP_ADDR=meilisearch:7700
|
- MEILI_HTTP_ADDR=meilisearch:7700
|
||||||
client:
|
client:
|
||||||
build:
|
image: ghcr.io/danny-avila/librechat-dev-client:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile.multi
|
|
||||||
target: prod-stage
|
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue