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:
What I've Tried:
Question:
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.
Only needed to update the docker-compose file volumes to this:
volumes:
- ./uploads:/app/uploads
- ./file-upload:/file-upload (this did the work)