-
-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Customize prefix_path #5156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hengxian-jiang
wants to merge
1
commit into
FlowiseAI:main
Choose a base branch
from
hengxian-jiang:customize_prefix_path
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Customize prefix_path #5156
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,59 @@ USER root | |
# Skip downloading Chrome for Puppeteer (saves build time) | ||
ENV PUPPETEER_SKIP_DOWNLOAD=true | ||
|
||
# Install latest Flowise globally (specific version can be set: [email protected]) | ||
RUN npm install -g flowise | ||
# Install build tools and pnpm | ||
RUN apk add --no-cache python3 py3-pip make g++ git | ||
RUN npm i -g pnpm turbo | ||
|
||
# Copy monorepo | ||
WORKDIR /app | ||
COPY . . | ||
|
||
# Set Vite base path for UI build at build time via ARG -> ENV | ||
ARG VITE_BASE_PATH | ||
ARG VITE_API_BASE_URL | ||
ENV VITE_BASE_PATH=${VITE_BASE_PATH} | ||
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL} | ||
|
||
# Install deps and build all packages | ||
RUN pnpm install --frozen-lockfile && pnpm build | ||
|
||
# Stage 2: Runtime stage | ||
FROM node:20-alpine | ||
|
||
# Install runtime dependencies | ||
RUN apk add --no-cache chromium git python3 py3-pip make g++ build-base cairo-dev pango-dev curl | ||
RUN apk add --no-cache chromium curl cairo-dev pango-dev | ||
|
||
# Set the environment variable for Puppeteer to find Chromium | ||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser | ||
|
||
# Copy Flowise from the build stage | ||
COPY --from=build /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
COPY --from=build /usr/local/bin /usr/local/bin | ||
# Create app directory | ||
WORKDIR /app | ||
|
||
# Copy node_modules from builder for runtime first to preserve workspace structure | ||
COPY --from=build /app/node_modules /app/node_modules | ||
COPY --from=build /app/packages/server/node_modules /app/packages/server/node_modules | ||
|
||
# Copy built server dist and bin | ||
COPY --from=build /app/packages/server/dist /app/packages/server/dist | ||
COPY --from=build /app/packages/server/bin /app/packages/server/bin | ||
COPY --from=build /app/packages/server/package.json /app/packages/server/package.json | ||
|
||
# Copy workspaces that are symlinked from node_modules | ||
COPY --from=build /app/packages/ui /app/packages/ui | ||
COPY --from=build /app/packages/components /app/packages/components | ||
|
||
# Default PORT | ||
ENV PORT=3000 | ||
|
||
# Optional base path for server to mount under (e.g., "/flowise") | ||
ENV BASE_PATH= | ||
|
||
# Expose port | ||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["flowise", "start"] | ||
# Start server | ||
# WORKDIR /app/packages/server | ||
# ENTRYPOINT ["node", "dist/index.js"] | ||
WORKDIR /app/packages/server/bin | ||
ENTRYPOINT ["./run", "start"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hengxian-jiang the server should also have support to custom base path