fix: node user lacks write permissions to ~/.flowise

This commit is contained in:
chungyau97 2025-11-24 18:35:34 +08:00
parent aa4899923e
commit d5bc57a4a0
2 changed files with 8 additions and 3 deletions

View File

@ -35,7 +35,9 @@ RUN pnpm install && \
pnpm build
# 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)
USER node

View File

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