Skip to content

Commit 4afedfe

Browse files
committed
3.0.22
1 parent 1481fdd commit 4afedfe

6 files changed

Lines changed: 76 additions & 5 deletions

File tree

docker/worker/Dockerfile.worker

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Stage 1: Build stage
2+
FROM node:20-alpine AS build
3+
4+
USER root
5+
6+
# Skip downloading Chrome for Puppeteer (saves build time)
7+
ENV PUPPETEER_SKIP_DOWNLOAD=true
8+
9+
# Install latest Flowise globally (specific version can be set: flowise@1.0.0)
10+
RUN npm install -g flowise
11+
12+
# Stage 2: Runtime stage
13+
FROM node:20-alpine
14+
15+
# Install runtime dependencies
16+
RUN apk add --no-cache chromium git python3 py3-pip make g++ build-base cairo-dev pango-dev curl
17+
18+
# Set the environment variable for Puppeteer to find Chromium
19+
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
20+
21+
# Copy Flowise from the build stage
22+
COPY --from=build /usr/local/lib/node_modules /usr/local/lib/node_modules
23+
COPY --from=build /usr/local/bin /usr/local/bin
24+
25+
# --- Healthcheck Setup ---
26+
WORKDIR /app/healthcheck
27+
28+
COPY docker/worker/healthcheck/package.json .
29+
30+
RUN npm install --omit=dev
31+
32+
COPY docker/worker/healthcheck/healthcheck.js .
33+
34+
# --- End Healthcheck Setup ---
35+
36+
# Set the main working directory
37+
WORKDIR /app
38+
39+
# Start healthcheck in background and flowise worker in foreground
40+
ENTRYPOINT ["/bin/sh", "-c", "node /app/healthcheck/healthcheck.js & sleep 5 && flowise worker"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// docker/healthcheck/healthcheck.js
2+
const express = require('express')
3+
const app = express()
4+
const port = 3000
5+
6+
app.get('/healthz', (req, res) => {
7+
res.status(200).send('OK')
8+
})
9+
10+
app.listen(port, () => {
11+
// eslint-disable-next-line no-console
12+
console.log(`Healthcheck server listening on port ${port}`)
13+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "flowise-bullmq-worker-healthcheck",
3+
"version": "1.0.0",
4+
"description": "Simple healthcheck server for Flowise worker",
5+
"main": "healthcheck.js",
6+
"private": true,
7+
"scripts": {
8+
"start": "node healthcheck.js"
9+
},
10+
"dependencies": {
11+
"express": "^4.19.2"
12+
}
13+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flowise-bullmq",
3-
"version": "3.0.3",
3+
"version": "3.0.22",
44
"private": true,
55
"homepage": "https://flowiseai.com",
66
"workspaces": [

packages/server/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "flowise-bullmq",
3-
"version": "3.0.3",
3+
"version": "3.0.22",
44
"description": "Flowiseai Server",
55
"main": "dist/index",
66
"types": "dist/index.d.ts",
77
"bin": {
8-
"flowise": "./bin/run"
8+
"flowise-bullmq": "./bin/run"
99
},
1010
"files": [
1111
"bin",
@@ -16,7 +16,7 @@
1616
"oauth2.html"
1717
],
1818
"oclif": {
19-
"bin": "flowise",
19+
"bin": "flowise-bullmq",
2020
"commands": "./dist/commands"
2121
},
2222
"scripts": {

packages/server/src/utils/logger.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ const logger = createLogger({
111111
defaultMeta: {
112112
package: 'server'
113113
},
114+
exitOnError: false,
114115
transports: [
115116
new transports.Console(),
116117
...(!process.env.STORAGE_TYPE || process.env.STORAGE_TYPE === 'local'
@@ -152,7 +153,11 @@ const logger = createLogger({
152153
})
153154
]
154155
: []),
155-
...(process.env.STORAGE_TYPE === 'gcs' ? [gcsErrorStream] : [])
156+
...(process.env.STORAGE_TYPE === 'gcs' ? [gcsErrorStream] : []),
157+
// Always provide a fallback rejection handler when no other handlers are configured
158+
...((!process.env.DEBUG || process.env.DEBUG !== 'true') && process.env.STORAGE_TYPE !== 's3' && process.env.STORAGE_TYPE !== 'gcs'
159+
? [new transports.Console()]
160+
: [])
156161
]
157162
})
158163

0 commit comments

Comments
 (0)