DEV Community

Cover image for Deploy a React App on AWS Lightsail: Testing, Docker, Docker Compose, Nginx & Github Actions

Deploy a React App on AWS Lightsail: Testing, Docker, Docker Compose, Nginx & Github Actions

Mangabo Kolawole on September 19, 2021

So you have written your React Application and you are ready to deploy it? Although there are already existing solutions like Netlify, Vercel, to ...
Collapse
 
barnent1 profile image
Glen Barnhardt

Great Post. After reading the comments I think some of you should look closer. With the addition of Kubernetes, you can load balance and automate many containers at a much lower cost. Dig a little deeper my coding friends.

Collapse
 
amrelmohamady profile image
Amr Elmohamady

Why would you use all that for a react app?! Like docker and nginx... Really!

Collapse
 
barnent1 profile image
Glen Barnhardt

I don't know why you would say that. Do you have a problem with react being deployed in a docker container? Some of us really wanted to see the complete flow of GitHub actions, SPECIFICALLY for a REACT APP and not node.js!!!

Collapse
 
koladev profile image
Mangabo Kolawole

Hey Amr.

We can use VPS to deploy some frontend projects too. At my job, we even use linode, docker and caddy to deploy the management dashboard. :)

Collapse
 
tolsee profile image
Tulsi Sapkota

The fact that we could doesn't mean we should 🙂. Great post by the way, I am sure many people will learn alot of things from this.

But, I would like to point out that serving static react apps through cloudfront(Any other CDN) is way better for most of the cases.

Thread Thread
 
barnent1 profile image
Glen Barnhardt

And way more expensive. Some of us cater to smaller businesses that only want to pay a small amount.

Collapse
 
jlancelot2007 profile image
Andrew Plater

The point is to learn how to use Lightsail not React.

Collapse
 
amrelmohamady profile image
Amr Elmohamady

Then the tutorial should be with node not react!

Thread Thread
 
barnent1 profile image
Glen Barnhardt

Why?

Collapse
 
aoulaa profile image
Olim Nizomov • Edited
      host 
      username
      key
      passphrase 
Enter fullscreen mode Exit fullscreen mode

i am new to aws and i am a bit lost here
where to get these names
pls need somehelp

Collapse
 
tngeene profile image
Ted Ngeene

Great post! I can relate to it especially since your workflow is almost similar to mine.
I deploy Django apps in an almost similar flow, never deployed react like this though but it seems like an interesting challenge. Will definitely try lightsail 🚀⛵

Collapse
 
sm0ke profile image
Sm0ke

🚀🚀

Collapse
 
koladev profile image
Mangabo Kolawole

🚀

Collapse
 
zachjonesnoel profile image
Jones Zachariah Noel

Awesome! Never knew Lightsail could use containers also.

Collapse
 
koladev profile image
Mangabo Kolawole

Lightsail is pretty powerful. :)

Collapse
 
tsunade01 profile image
Jessica

Great Post!

Collapse
 
koladev profile image
Mangabo Kolawole

Thank you Jessica.:)

Collapse
 
aoulaa profile image
Olim Nizomov

where did you get CERTBOT_EMAIL ?

Collapse
 
rocksongabriel profile image
Gabriel Rockson

I think this will be great for deploying a NextJS app