Use the port from DATABASE_URL

It turned out this was really simple and under my nose the whole time. We set these options from the parsed URL and just neglected to include port.