Redirect traffic from public port to an a different container port

I’m messing around with setting up Foundry on Reclaim Cloud (D&DoOO??) and I have things working but by default this node.js app wants to be used on port 30000:

https://foundryvtt.com/article/hosting/

This means that I need to visit this at mydomain.com:30000. Is there any way I can redirect public traffic from port 80 (and 443) to the container’s port 30000 (for some reason it doesn’t seem like I am not able to change Foundry’s config to use a different port)

I recently was setting up a Node.js and found that it used a non-standard port but that port was still proxied by the shared load balancer. I found this information on that feature at https://docs.jelastic.com/container-ports#ports-auto-redirect

During a node creation, the platform detects the ports which are listened on the TCP level. The commonly used for standard services (e.g. SSH, mail, databases, etc.) are automatically filtered. The first among the remaining ports becomes the container entry point so that all incoming requests are forwarded to it.

This process is performed on each container launch, so the corresponding application becomes available over the embedded Shared Load Balancer just after being deployed, without any manual intervention required.

However, in case you need to disable or adjust this functionality (e.g. if it exposes application admin panel), you can manually change the auto-redirect settings during the container creation. For that, switch to the Variables section, add the dedicated JELASTIC_EXPOSE parameter and set its value based on your needs

I see you have port 30000 exposed there so it should be working I would think:

I’m not sure you’ve got the app running yet though since I tried setting an Endpoint for 30000 and nothing was showing nor did loading the site under :30000 either so I would first make sure you’ve confirmed the app is up and running and ideally the platform should proxy it automatically.

I had the application running just didn’t point to the actual URL.

I realized that I totally misunderstood some basic things that Reclaim Cloud and Jelastic do here. After reading your reply I realized for some reason I assumed every container that I wanted to access via a web browser needed the Public IPv4 option checked, so I wasn’t even using the Shared Load Balancer. Unchecking Public IPv4 and checking Access via SLB fixed it.

I’m learning!

1 Like

Ah yeah, the SLB is great and will save you money as well since you won’t need a public IP for everything, just for certain types of tasks where a dedicated IP makes sense.

1 Like