Skip to content

Commit 080ed9d

Browse files
update render dockerfile for recent changes to master
1 parent a48a5ad commit 080ed9d

File tree

2 files changed

+54
-5
lines changed

2 files changed

+54
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish Docker image for Render.com deployments
2+
3+
concurrency:
4+
group: build-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: ['render']
10+
paths-ignore:
11+
- 'render.yaml'
12+
- '*.md'
13+
- 'cloud-deployments/*'
14+
- 'images/*'
15+
- '.vscode/*'
16+
17+
jobs:
18+
push_to_registries:
19+
name: Push Docker image to DockerHub for use on Render.com deployments
20+
runs-on: ubuntu-latest
21+
permissions:
22+
packages: write
23+
contents: read
24+
steps:
25+
- name: Check out the repo
26+
uses: actions/checkout@v4
27+
28+
- name: Log in to Docker Hub
29+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: Extract metadata (tags, labels) for Docker
35+
id: meta
36+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
37+
with:
38+
images: |
39+
mintplexlabs/anythingllm
40+
41+
- name: Build and push Docker images
42+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
43+
with:
44+
context: .
45+
file: ./docker/render.Dockerfile
46+
platforms: linux/amd64
47+
push: true
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}
50+
build-args: |
51+
"STORAGE_DIR=/storage"

docker/render.Dockerfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,12 @@ WORKDIR /app
5252
FROM base as frontend-deps
5353

5454
COPY ./frontend/package.json ./frontend/yarn.lock ./frontend/
55-
RUN cd ./frontend/ && yarn install && yarn cache clean
55+
RUN cd ./frontend/ && yarn install --network-timeout 100000 && yarn cache clean
5656

5757
# Install server dependencies
5858
FROM base as server-deps
5959
COPY ./server/package.json ./server/yarn.lock ./server/
60-
RUN cd ./server/ && yarn install --production && yarn cache clean && \
61-
rm /app/server/node_modules/vectordb/x86_64-apple-darwin.node && \
62-
rm /app/server/node_modules/vectordb/aarch64-apple-darwin.node
60+
RUN cd ./server/ && yarn install --production --network-timeout 100000 && yarn cache clean
6361

6462
# Compile Llama.cpp bindings for node-llama-cpp for this operating system.
6563
USER root
@@ -82,7 +80,7 @@ COPY --from=build-stage /app/frontend/dist ./server/public
8280
COPY --chown=anythingllm:anythingllm ./collector/ ./collector/
8381

8482
# Install collector dependencies
85-
RUN cd /app/collector && yarn install --production && yarn cache clean
83+
RUN cd /app/collector && yarn install --production --network-timeout 100000 && yarn cache clean
8684

8785
# Setup the environment
8886
ENV NODE_ENV=production

0 commit comments

Comments
 (0)