Deployment & Hosting
Open
Example from the ReviewMyCodes team
Node app works in Docker locally but the hosting platform says "no open ports detected"
Description
My Express app runs fine with docker run on my laptop. After deploying the same image, the platform health check fails and the deploy is rolled back.
— This is an example problem from the ReviewMyCodes team, showing how a good question looks. Real community questions appear alongside it.
Expected
The deployed container should accept requests on the platform's port.
Actual
Deploy failed: No open ports detected on 0.0.0.0, continuing to scan… Health check timed out.
Steps to reproduce
- Build the image
- Deploy to the hosting platform
- Watch the deploy logs
Code
javascript
const express = require("express");
const app = express();
app.get("/health", (req, res) => res.send("ok"));
app.listen(3000, "127.0.0.1", () => console.log("Listening on 3000"));