Configuration
Ports and health checks
How web traffic reaches your container, the PORT variable, per-domain ports and paths, extra published ports, and how MarvX decides a deployment is healthy.
How traffic reaches your app
- Visitors reach your domain over HTTPS (HTTP redirects to HTTPS).
- The MarvX router terminates TLS and forwards over a private network to your container.
- It connects to the port in
PORT, which MarvX sets to3000if you don't.
So your server must listen on that port and bind to 0.0.0.0, not 127.0.0.1/localhost. Otherwise the deploy still shows succeeded but visitors get 502 Bad Gateway.
app.run(host="0.0.0.0", port=int(os.environ.get("PORT", 3000)))Other ports
- Whole app: set
PORTon the Environment tab (e.g.PORT=80for nginx images) and deploy. - One domain: edit it on Domains and set Container port; other domains keep using
PORT. - Path prefix: a domain's Path (e.g.
/api) limits it to that prefix; Strip path removes the prefix before your app sees it. A hostname can be connected only once across MarvX, so use subdomains (e.g.api.example.com) to split traffic between apps.
Published Ports
General → Published Ports maps extra host ports to container ports (TCP/UDP) for non-HTTP services. Save, then deploy. On MarvX-hosted servers only web traffic (80/443) is open to the internet, so other ports may be unreachable from outside. Contact support if you need one exposed.
Health checks
There's no HTTP health check. About 10 seconds after a new container starts, MarvX checks it: running → deployment succeeded; exited or restarting after a crash → failed.
Afterwards, crashed containers restart automatically unless you stopped the app; Monitoring and Logs show what's happening. Deploys replace the old container with the new one, so expect a brief interruption.
Apps and managed databases share a private network; use the database's internal host (see Managed databases).