Compare commits

...

6 Commits

5 changed files with 23 additions and 42 deletions

View File

@ -35,7 +35,9 @@ RUN pnpm install && \
pnpm build pnpm build
# Give the node user ownership of the application files # Give the node user ownership of the application files
RUN chown -R node:node . RUN chown -R node:node . && \
mkdir -p /home/node/.flowise && \
chown -R node:node /home/node/.flowise
# Switch to non-root user (node user already exists in node:20-alpine) # Switch to non-root user (node user already exists in node:20-alpine)
USER node USER node

View File

@ -6,7 +6,7 @@ PORT=3000
############################################## DATABASE #################################################### ############################################## DATABASE ####################################################
############################################################################################################ ############################################################################################################
DATABASE_PATH=/root/.flowise DATABASE_PATH=/home/node/.flowise
# DATABASE_TYPE=postgres # DATABASE_TYPE=postgres
# DATABASE_PORT=5432 # DATABASE_PORT=5432
# DATABASE_HOST="" # DATABASE_HOST=""
@ -23,7 +23,7 @@ DATABASE_PATH=/root/.flowise
############################################################################################################ ############################################################################################################
# SECRETKEY_STORAGE_TYPE=local #(local | aws) # SECRETKEY_STORAGE_TYPE=local #(local | aws)
SECRETKEY_PATH=/root/.flowise SECRETKEY_PATH=/home/node/.flowise
# FLOWISE_SECRETKEY_OVERWRITE=myencryptionkey # (if you want to overwrite the secret key) # FLOWISE_SECRETKEY_OVERWRITE=myencryptionkey # (if you want to overwrite the secret key)
# SECRETKEY_AWS_ACCESS_KEY=<your-access-key> # SECRETKEY_AWS_ACCESS_KEY=<your-access-key>
# SECRETKEY_AWS_SECRET_KEY=<your-secret-key> # SECRETKEY_AWS_SECRET_KEY=<your-secret-key>
@ -36,7 +36,7 @@ SECRETKEY_PATH=/root/.flowise
############################################################################################################ ############################################################################################################
# DEBUG=true # DEBUG=true
LOG_PATH=/root/.flowise/logs LOG_PATH=/home/node/.flowise/logs
# LOG_LEVEL=info #(error | warn | info | verbose | debug) # LOG_LEVEL=info #(error | warn | info | verbose | debug)
# LOG_SANITIZE_BODY_FIELDS=password,pwd,pass,secret,token,apikey,api_key,accesstoken,access_token,refreshtoken,refresh_token,clientsecret,client_secret,privatekey,private_key,secretkey,secret_key,auth,authorization,credential,credentials # LOG_SANITIZE_BODY_FIELDS=password,pwd,pass,secret,token,apikey,api_key,accesstoken,access_token,refreshtoken,refresh_token,clientsecret,client_secret,privatekey,private_key,secretkey,secret_key,auth,authorization,credential,credentials
# LOG_SANITIZE_HEADER_FIELDS=authorization,x-api-key,x-auth-token,cookie # LOG_SANITIZE_HEADER_FIELDS=authorization,x-api-key,x-auth-token,cookie
@ -50,7 +50,7 @@ LOG_PATH=/root/.flowise/logs
############################################################################################################ ############################################################################################################
# STORAGE_TYPE=local (local | s3 | gcs) # STORAGE_TYPE=local (local | s3 | gcs)
BLOB_STORAGE_PATH=/root/.flowise/storage BLOB_STORAGE_PATH=/home/node/.flowise/storage
# S3_STORAGE_BUCKET_NAME=flowise # S3_STORAGE_BUCKET_NAME=flowise
# S3_STORAGE_ACCESS_KEY_ID=<your-access-key> # S3_STORAGE_ACCESS_KEY_ID=<your-access-key>
# S3_STORAGE_SECRET_ACCESS_KEY=<your-secret-key> # S3_STORAGE_SECRET_ACCESS_KEY=<your-secret-key>

View File

@ -1,25 +0,0 @@
# Stage 1: Build stage
FROM node:20-alpine AS build
USER root
# Skip downloading Chrome for Puppeteer (saves build time)
ENV PUPPETEER_SKIP_DOWNLOAD=true
# Install latest Flowise globally (specific version can be set: flowise@1.0.0)
RUN npm install -g flowise
# 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
# 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
ENTRYPOINT ["flowise", "start"]

View File

@ -13,17 +13,15 @@ services:
restart: always restart: always
flowise: flowise:
image: flowiseai/flowise:latest image: flowiseaiyau/test:0.0.2
container_name: flowise-main container_name: flowise-main
restart: always restart: always
ports: ports:
- '${PORT:-3000}:${PORT:-3000}' - '${PORT:-3000}:${PORT:-3000}'
volumes:
- ~/.flowise:/root/.flowise
environment: environment:
# --- Essential Flowise Vars --- # --- Essential Flowise Vars ---
- PORT=${PORT:-3000} - PORT=${PORT:-3000}
- DATABASE_PATH=${DATABASE_PATH:-/root/.flowise} - DATABASE_PATH=${DATABASE_PATH}
- DATABASE_TYPE=${DATABASE_TYPE} - DATABASE_TYPE=${DATABASE_TYPE}
- DATABASE_PORT=${DATABASE_PORT} - DATABASE_PORT=${DATABASE_PORT}
- DATABASE_HOST=${DATABASE_HOST} - DATABASE_HOST=${DATABASE_HOST}
@ -154,22 +152,22 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
start_period: 30s start_period: 30s
entrypoint: /bin/sh -c "sleep 3; flowise start" volumes:
- flowise_data:/home/node/.flowise
entrypoint: /bin/sh -c "sleep 3; pnpm start"
depends_on: depends_on:
- redis - redis
networks: networks:
- flowise-net - flowise-net
flowise-worker: flowise-worker:
image: flowiseai/flowise-worker:latest image: flowiseaiyau/test:0.0.2
container_name: flowise-worker container_name: flowise-worker
restart: always restart: always
volumes:
- ~/.flowise:/root/.flowise
environment: environment:
# --- Essential Flowise Vars --- # --- Essential Flowise Vars ---
- WORKER_PORT=${WORKER_PORT:-5566} - WORKER_PORT=${WORKER_PORT:-5566}
- DATABASE_PATH=${DATABASE_PATH:-/root/.flowise} - DATABASE_PATH=${DATABASE_PATH}
- DATABASE_TYPE=${DATABASE_TYPE} - DATABASE_TYPE=${DATABASE_TYPE}
- DATABASE_PORT=${DATABASE_PORT} - DATABASE_PORT=${DATABASE_PORT}
- DATABASE_HOST=${DATABASE_HOST} - DATABASE_HOST=${DATABASE_HOST}
@ -300,6 +298,8 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
start_period: 30s start_period: 30s
volumes:
- flowise_data:/home/node/.flowise
entrypoint: /bin/sh -c "node /app/healthcheck/healthcheck.js & sleep 5 && pnpm run start-worker" entrypoint: /bin/sh -c "node /app/healthcheck/healthcheck.js & sleep 5 && pnpm run start-worker"
depends_on: depends_on:
- redis - redis
@ -310,6 +310,7 @@ services:
volumes: volumes:
redis_data: redis_data:
driver: local driver: local
flowise_data:
networks: networks:
flowise-net: flowise-net:

View File

@ -2,7 +2,7 @@ version: '3.1'
services: services:
flowise: flowise:
image: flowiseai/flowise:latest image: flowiseaiyau/test:0.0.2
restart: always restart: always
environment: environment:
- PORT=${PORT} - PORT=${PORT}
@ -142,5 +142,8 @@ services:
retries: 5 retries: 5
start_period: 30s start_period: 30s
volumes: volumes:
- ~/.flowise:/root/.flowise - flowise_data:/home/node/.flowise
entrypoint: /bin/sh -c "sleep 3; flowise start" entrypoint: /bin/sh -c "sleep 3; pnpm start"
volumes:
flowise_data: