Is it advisable to run docker-all-in-one of flowable directly in production just by configuring a postgres database?

We are planning to use the rest API’s to interact with flowable engine.

I would not advise running the All-in-One container in production (or possibly any of the prebuilt containers). The all in one container contains modeler and admin as well as task and idm, you certainly won’t need to scale the modeler, admin, and idm at the same time you’d need to scale task. If you are just using the REST API, there is a flowable-rest container that you can use. You’ll likely also need an instance of flowable-idm (also available as a container).