mirror of
https://github.com/FlowiseAI/Flowise.git
synced 2026-10-12 10:09:53 +00:00
* chore: update Node.js version consistency and optimize Docker build - Bump .nvmrc from v20.19.2 to v20.20.2 to match CI - Narrow package.json engines to ^20 across root and packages/server - Exclude @flowiseai/agentflow and @flowiseai/observe from Docker build to save ~40-50s per build (sdk packages not needed for app runtime) Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore: add build:docker script and fix Docker build filter Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * chore: update README files Node.js version to 20.0.0 --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: yau-wd <[email protected]>
45 lines
938 B
Docker
45 lines
938 B
Docker
# Build local monorepo image
|
|
# docker build --no-cache -t flowise .
|
|
|
|
# Run image
|
|
# docker run -d -p 3000:3000 flowise
|
|
|
|
FROM node:20-alpine
|
|
|
|
# Install system dependencies and build tools
|
|
RUN apk update && \
|
|
apk add --no-cache \
|
|
libc6-compat \
|
|
python3 \
|
|
make \
|
|
g++ \
|
|
build-base \
|
|
cairo-dev \
|
|
pango-dev \
|
|
chromium \
|
|
curl && \
|
|
npm install -g pnpm
|
|
|
|
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
|
|
ENV NODE_OPTIONS=--max-old-space-size=8192
|
|
|
|
WORKDIR /usr/src/flowise
|
|
|
|
# Copy app source
|
|
COPY . .
|
|
|
|
# Install dependencies and build (excluding sdk packages not needed for Docker)
|
|
RUN pnpm install && \
|
|
pnpm build:docker
|
|
|
|
# Give the node user ownership of the application files
|
|
RUN chown -R node:node .
|
|
|
|
# Switch to non-root user (node user already exists in node:20-alpine)
|
|
USER node
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD [ "pnpm", "start" ] |