DEV Community

Discussion on: Containerize React app with Docker for Production

Collapse
 
xai1983kbu profile image
xai1983kbu

Hi! Thank you for your article!
Is it possible to containerize NextJs App with Nginx in one container?
I don't understand how to run two processes in one container.
I find this answer stackoverflow.com/a/63038894/9783262 but have no success yet.

Can we containerize only NextJs App (without Nginx) for usage with "Fargate + Application Load Balancer"?

Collapse
 
xai1983kbu profile image
xai1983kbu • Edited

I manage to launch containerize NextJs App without Nginx
Example with Pulumi
github.com/pulumi/examples/issues/...

It's interesting now - Is it the right way (don't use Nginx)?

Collapse
 
mubbashir10 profile image
Mubbashir Mustafa

Umm, I would throw in Nginx there to do the load balancing, caching, compressing, etc. But yeah that's just my opinion :)
If you are generally interested in why we want to use Nginx with node server, this might help: expressjs.com/en/advanced/best-pra...

Thread Thread
 
mubbashir10 profile image
Mubbashir Mustafa

Btw you can add more than one container in ECS. That's how usually the node js apps are deployed (the other being a sidecar container).

Thread Thread
 
xai1983kbu profile image
xai1983kbu

Thank you soo much!

Thread Thread
 
abhipise81 profile image
Abhishek Pise

Can you guide me How to deploy Preact app into ecs?

Thread Thread
 
mubbashir10 profile image
Mubbashir Mustafa