mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 12:40:09 +01:00
update render build
This commit is contained in:
parent
addb3d0c3e
commit
210692472a
@ -1,4 +1,4 @@
|
|||||||
name: Publish Docker image for Render.com deployments
|
name: Publish Docker image for Render & Railway deployments
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: build-${{ github.ref }}
|
group: build-${{ github.ref }}
|
||||||
@ -18,7 +18,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push_to_registries:
|
push_to_registries:
|
||||||
name: Push Docker image to DockerHub for use on Render.com deployments
|
name: Push Docker image to DockerHub for use on Render or Railway deployments
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
@ -26,28 +26,52 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check if DockerHub build needed
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Check if the secret for USERNAME is set (don't even check for the password)
|
||||||
|
if [[ -z "${{ secrets.DOCKER_USERNAME }}" ]]; then
|
||||||
|
echo "DockerHub build not needed"
|
||||||
|
echo "enabled=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "DockerHub build needed"
|
||||||
|
echo "enabled=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
id: dockerhub
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||||
|
# Only login to the Docker Hub if the repo is mintplex/anythingllm, to allow for forks to build on GHCR
|
||||||
|
if: steps.dockerhub.outputs.enabled == 'true'
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
mintplexlabs/anythingllm
|
${{ steps.dockerhub.outputs.enabled == 'true' && 'mintplexlabs/anythingllm' || '' }}
|
||||||
|
ghcr.io/${{ github.repository }}
|
||||||
- name: Build and push Docker images
|
tags: |
|
||||||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
|
type=raw,value=render
|
||||||
|
type=raw,value=railway
|
||||||
|
|
||||||
|
- name: Build and push multi-platform Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/render.Dockerfile
|
file: ./docker/render.Dockerfile
|
||||||
platforms: linux/amd64
|
|
||||||
push: true
|
push: true
|
||||||
|
platforms: linux/amd64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
build-args: |
|
build-args: |
|
||||||
"STORAGE_DIR=/storage"
|
"STORAGE_DIR=/storage"
|
||||||
|
@ -59,11 +59,6 @@ FROM base as server-deps
|
|||||||
COPY ./server/package.json ./server/yarn.lock ./server/
|
COPY ./server/package.json ./server/yarn.lock ./server/
|
||||||
RUN cd ./server/ && yarn install --production --network-timeout 100000 && yarn cache clean
|
RUN cd ./server/ && yarn install --production --network-timeout 100000 && yarn cache clean
|
||||||
|
|
||||||
# Compile Llama.cpp bindings for node-llama-cpp for this operating system.
|
|
||||||
USER root
|
|
||||||
RUN cd ./server && npx --no node-llama-cpp download
|
|
||||||
USER anythingllm
|
|
||||||
|
|
||||||
# Build the frontend
|
# Build the frontend
|
||||||
FROM frontend-deps as build-stage
|
FROM frontend-deps as build-stage
|
||||||
COPY ./frontend/ ./frontend/
|
COPY ./frontend/ ./frontend/
|
||||||
|
Loading…
Reference in New Issue
Block a user