Skip to content

Superklok/ReactTaskTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

React Task Tracker v2.2.5


Basic Root User Deployment Guide For App Evaluation

This guide is intended for deployment testing purposes & it uses the Root user. Creating a new user is strongly suggested for a production setup.

1. Deploy a Cloud Compute Ubuntu 21.10 server from Vultr named "TaskTracker".


2. Open a PowerShell (as Admin) terminal & connect to your TaskTracker server's IP address via SSH:

ssh root@enter.TaskTracker.IP.address
  • Enter the password provided by Vultr on the TaskTracker server page & follow all prompts until connected.

3. Update Ubuntu OS:

sudo apt update && sudo apt upgrade -y

4. Enable & setup UFW Firewall:

sudo ufw enable
sudo ufw status
  • It should display that the UFW Firewall is active.
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
  • Restart the TaskTracker server then reconnect via SSH (repeat step 2).
sudo reboot

5. Install Node onto the server:

curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install nodejs
npm --version
  • The NPM version should be displayed.
node --version
  • The Node version should be displayed.

6. Clone the ReactTaskTracker GitHub repository to the TaskTracker server:

cd ~/
mkdir superkloklabs
cd superkloklabs
git clone https://github.com/Superklok/ReactTaskTracker.git

7. Install dependencies:

cd ReactTaskTracker/v2.x.x/
npm i
  • Create a production build:
npm run build

8. Start app using PM2:

npm i pm2 -g
  • Set environment variables:
cd ~/
nano .bashrc
  • Add the following to the top of the file:
export PORT="ThePortTaskTrackerIsRunningOn"
export NODE_ENV="production"
  • Press ctrl+x & save changes, then refresh the user environment:
source .bashrc
  • Double check that the new environment variables have been set correctly.
env
  • Then start the app:
cd superkloklabs/ReactTaskTracker/v2.x.x/
pm2 serve build/ ThePortTaskTrackerIsRunningOn --name "TaskTracker" --spa

9. Setup a start script to automatically start the app if the TaskTracker server is restarted:

pm2 startup ubuntu
pm2 save

10. Install & configure NGINX:

sudo apt install nginx
sudo nano /etc/nginx/sites-available/default
  • Add the following to the location part of the server block:
server_name yourwebsite.com www.yourwebsite.com;
    location / {
        proxy_pass http://localhost:ThePortTaskTrackerIsRunningOn;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
  • Press ctrl+x & save changes.
  • Check NGINX config:
sudo nginx -t
  • Restart NGINX:
sudo service nginx restart

11. Update your DNS "A" records for "yourwebsite.com" & "www.yourwebsite.com" with the TaskTracker server IP address.


12. Setup SSL with LetsEncrypt:

sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx -d yourwebsite.com -d www.yourwebsite.com
  • Enter your@email.com for the email address it requests, & select (y)es, then (n)o.
  • Test the 90 day renewal process:
certbot renew --dry-run
  • Test the PM2 startup script by restarting the TaskTracker server:
sudo reboot
  • Then reconnect to the TaskTracker server via SSH (repeat step 2).
  • Check PM2 to make sure TaskTracker is still running:
pm2 status
  • Logout of SSH:
exit


DONE!


Languages

Libraries, Frameworks & Runtime

Deployment Tools & Services






React Task Tracker v1.19.6


LINUX Setup Guide For App Evaluation

This guide is intended for app testing purposes & it uses the Root user.

1. Update Linux OS:

sudo apt update && sudo apt upgrade -y

2. Install Node:

curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install nodejs
npm --version
  • The NPM version should be displayed.
node --version
  • The Node version should be displayed.

3. Clone the ReactTaskTracker GitHub repository:

cd ~/
mkdir superkloklabs
cd superkloklabs
git clone https://github.com/Superklok/ReactTaskTracker.git

4. Install dependencies:

cd ReactTaskTracker/v1.x.x/
npm i

5. Create a production build:

npm run build
sudo npm i -g serve

6. Start database:

npm run server

7. Start app in production mode (open a new terminal window):

serve -s build -p 8000

8. React Task Tracker can now be accessed on the browser by going to:

http://localhost:8000/


DONE!


Languages

Database

Libraries, Frameworks & Runtime