2

I'm currently trying to setup a nuxt server on Jelastic Cloud but I did not manage to make it available.

I configured auto deploy with git, with a post-deploy hook that builds the nuxt application. When the container is launched, I can see that nuxt is listening in the logs but when I go to check in the browser if it works, I get the 502 application down page.

I tried to apply variables such as JELASTIC_EXPOSE or JELASTIC_PRIORITY_PORTS to configure the shared load balancer but none of this is working. Even with a public IP address and refering to the right port in the URL, I couldn't access the app. I also saw that it's probably possible to use pm2 to launch the app but I want to avoid custom nginx configuration for this app, since I think it could work without.

Have you ever tried to do something like this ? Have you an idea of what I should do to make this work ?

Thanks a lot !

Kroustille
  • 111
  • 2
  • 5

1 Answers1

2

I found the solution !

Nuxt was listening on the host localhost and the automatic port forwarding done by jelastic shared load balancer doesn't work with that.

I changed the host to 0.0.0.0 and it works perfectly fine :)

In the logs I can now see that nuxt is listening on the private IP of the container instead of just localhost.

Kroustille
  • 111
  • 2
  • 5
  • Hi, can you kindly share more info about where you made that change, from localhost to 0.0.0.0? I'm struggling with a similar problem. Thank you! – Matt Bedford Apr 16 '22 at 11:06