How to run rails server (or any server) on a VM?

  1. Make sure Nginx is installed. Else follow this simple guide first — https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04
  2. Go to cd /etc/nginx/sites-available
  3. Add below details. Replace your server_name and proxy_pass (Where your server is running) with correct values

4. Create a symlink for it:

5. Restart Nginx:

How to run service?

Then systemctl start grambuddy-server.service

How to make an endpoint http“s” / get a certificate for free from let’s encrypt?

  1. Ref: https://certbot.eff.org/

To provide domain by yourself

How to Deploy a static react build in VM?

Here the website name is example.com

  1. Go to cd /etc/nginx/sites-available
  2. Create a new file example.com nano example.com
  3. Add below details. Replace the website with correct values

4. Create a symlink for it:

Go to the project repo

To update the static files

How to copy Postgres data to a CSV and then to your computer

And then

Postgres Dump

Moving Files within Server

Postgres Restore

Check the IP

GET: https://httpbin.org/ip

Sample Dummy JSON Data

https://jsonplaceholder.typicode.com/todos/1

Learning nd Developing.