MUP Nginx/PHP Configuration

I’m using iron router to create an API proxy that uses another API. One of the methods takes too long to run and when I call my API proxy endpoint I get 504 Gateway Timeout nginx error. That proxy app is being deployed using MUP and I would like to know how can I increase the timeout in order to avoid this error.