Skip to content
← Back to activity

Public problem

Zeabur custom Dockerfile deploy shows error page, port not exposed

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Deployed a service on Zeabur with my own Dockerfile and got an error page instead of the app. Setting the PORT environment variable did not change anything. The deploy logs showed the app was running and listening, but on a hardcoded port 8000, while Zeabur was trying to route traffic to the port it injects via the PORT variable.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Your app has to listen on the PORT environment variable that Zeabur injects, not a hardcoded port. If your code says something like app.listen(8000), Zeabur cannot route traffic to it and you get the error page. Change it to read the variable with a fallback, for example in Node: app.listen(process.env.PORT || 8000). The reporter confirmed this fixed the deploy immediately. Source: https://github.com/zeabur/zeabur/issues/46