How to pass command line arguments to Joplin server running in Docker container?

Operating system

Linux

Joplin version

3.4.1

What issue do you have?

I'd like to change the log level of Joplin server in prod, to avoid the excessive disk I/O. Checking the documentation and the source code in GitHub, I found out that this can be accomplished using the --log-level command line argument. However, I deployed Joplin in a Docker container, and adding the --log-level to docker-compose file is not working.

Here's what I tried as command in docker-compose.yml:

command: ["yarn", "start-prod", "--log-file", "warn"]

This command causes an error in the logs:

error: unknown option `--log-level'

This is the command line that is being executed according to the log:

pm2 kill && pm2 install pm2-logrotate && pm2 set pm2-logrotate:max_size 100MB && pm2 set pm2-logrotate:retain 5 && pm2 set pm2-logrotate:compress true && pm2 start --no-daemon --exp-backoff-restart-delay=1000 dist/app.js --log-level warn

Is there a way to add this option to change the log level?