I'm running a Rocket.Chat 7.5.0 instance using Docker and Docker Compose. The app is built from a Meteor bundle and uses a custom Dockerfile. Everything starts up correctly, and I'm able to use the app. However, I'm facing an issue when trying to upload image files in the chat window.
Uploading .json and .html files works fine, but image uploads fail with the following error:
{
"success": false,
"error": "TypeError: A boolean was expected [ufs: cannot upload file] [upload-failed]",
"errorType": "upload-failed"
}
Dockerfile (relevant part):
FROM node:22.13.1-bullseye-slim
# ... (installs, setup, and copying bundle)
# Set environment variables
ENV PORT=3000 \
NODE_ENV=production \
ROOT_URL=http://localhost:3000 \
MONGO_URL=mongodb://mongo:27017/rocketchat?replicaSet=rs0 \
MONGO_OPLOG_URL=mongodb://mongo:27017/local?replicaSet=rs0 \
WAIT_FOR_MONGO=true
EXPOSE 3000
ENTRYPOINT ["/app/entrypoint.sh"]
docker-compose.yml (relevant part)
services:
rocketchat:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./uploads:/app/uploads
environment:
- MONGO_URL=mongodb://mongo:27017/rocketchat?replicaSet=rs0
- MONGO_OPLOG_URL=mongodb://mongo:27017/local?replicaSet=rs0
- ROOT_URL=http://localhost:3000
- PORT=3000
- NODE_ENV=production
- WAIT_FOR_MONGO=true
- SITE_URL=http://localhost:3000
Additional Details:
- Rocket.Chat runs fine otherwise.
- The uploads folder is mounted properly.
- Issue occurs only with images (.png, .jpg, etc.).
- Error suggests a type mismatch: “A boolean was expected”.
What I've Tried:
- Verified folder permissions on the uploads directory. (chmod 777, 775 on app/uploads folder inside docker container)
- Checked Rocket.Chat logs for any other clues.
- Compared working uploads (.json, .html) vs non-working image types.
Question:
- How can I resolve this image upload error?
- Is there a missing configuration in my Dockerfile, environment variables, or Rocket.Chat file store settings?
Any guidance or insight would be appreciated.
FYI: when I run meteor run in IDE the uploads works all images and other files get uploaded as well.