menu
up-caret
down-caret

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

# Now

Instant global deployments

Trending conversations
Transpiling for es6 modules and node-server?
@deitcher · 5h
503 on deployment
@codelayer · 25d
Do apps on now stay up for a long time without refreshing?
@marc-sloth-eastman · 2h
BRU1 instances are timing out
@helguita · 34d
Are Now Logs Working?
@txemaleon · 22h

Docker deployment v1 hangs at instance verification

christoph peter (@chrillo) · October 6, 2018 at 2:28pm

Docker deployment v1 hangs at instance verification

October 6, 2018 at 2:28pm (Edited 6 months ago)

I have a simple hello world dockerized express app. when I run it locally it works fine, it works with docker-compose as well. its exposing an http port and in the now logs I can see it gets to the point where its listening. but it seems like now is not picking up the exposed port. there are no errors in the logs. it just hangs and then times out. I first suspected the pm2-runtime beeing an issue but even if I just run node directly the same thing happens.

this is the code I am using, dockerfile etc ...

https://github.com/chrillo/node-docker/tree/4fbd3120a017cf66771e36bd7f4d0e879642238a


October 6, 2018 at 3:29pm

i appears if I change the exposed port from 8080 to 3000 it works -> is that intended behaviour?

  • reply
  • like

It is not, in theory you just expose a single port and every traffic will be routed to that port...

  • reply
  • like

Can you make a minimal reproducible example?

  • reply
  • like

if you look at the link above https://github.com/chrillo/node-docker/tree/4fbd3120a017cf66771e36bd7f4d0e879642238a and take the index.js file + the docker file + package json ... but during debugging the issue I removed pretty much everything so I'd just try a docker file which exposes PORT 8080

  • reply
  • like

the required change really was changing 8080 to 3000

  • reply
  • like

November 1, 2018 at 2:02am

I found that running a nodejs app, when I specified port 3001, verification failed consistently. When I switched to 3000, it worked like a charm. :-(

  • reply
  • like

(Not a docker app, it seems verification process only checks certain ports, would be nice if we could specify the exposed port in now.json to clue the verify process.)

  • reply
  • like

hmm, I spoke too soon! My latest deployment on 3000 (node app) failed just now..

  • reply
  • like