Am I on the Right Path? (nginx and deployment)

I’m a complete beginner to nginx and pretty new to web dev as well. I wanted to run it by someone to see if my train of thought is on the right path.

I have a finished personal portfolio that I would like to deploy and I have a domain bought through Namecheap. The domain is pointing to the IP address of a virtual server I bought through DigitalOcean ($4/month droplet). I tried to move my source code to the VS using SCP but it took over 30 minutes and still didn’t finish so I think I’m just going to push the code to github and then clone it.

On the VS I have configured the firewall to open ports 22, 80, and 443.

Now here’s where I’m a little lost. If I run the environment and the code is being hosted locally, does that mean people can now view my site since domain -> VS and the VS is executing my code? (I am planning on reading into systemd to take care of the lifecycle of the app but I don’t really know what that means yet)

As for nginx, I want to use it to process the requests the firewall lets in to handle the encryption and decryption of SSL/TLS certificates (also not educated on this yet). Is it okay to have the nginx server on the same VS?

Read more here: Source link