Frontend commands:
yum install nginx –y
systemctl enable nginx
systemctl start nginx
rm -rf /usr/share/nginx/html/*
curl -o /tmp/[Link] [Link]
cd /usr/share/nginx/html
unzip /tmp/[Link]
Create Nginx Reverse Proxy Configuration.
vim /etc/nginx/default.d/[Link]
proxy_http_version 1.1;
location /images/ {
expires 5s;
root /usr/share/nginx/html;
try_files $uri /images/[Link];
}
location /api/catalogue/ { proxy_pass [Link] }
location /api/user/ { proxy_pass [Link] }
location /api/cart/ { proxy_pass [Link] }
location /api/shipping/ { proxy_pass [Link] }
location /api/payment/ { proxy_pass [Link] }
location /health {
stub_status on;
access_log off;
}
systemctl restart nginx
telnet <ip-address>
quit
Monogo DB:
Create the file using vim editor vim /etc/[Link].d/[Link]
Add below lines
[mongodb-org-4.2]
name=MongoDB Repository
baseurl=[Link]
org/4.2/x86_64/
gpgcheck=0
enabled=1
yum install mongodb-org –y
systemctl enable mongod
systemctl start mongod
Update listen address from [Link] to [Link] in /etc/[Link] using vim
editor
systemctl restart mongod
Catlogue:
Install [Link]
curl -sL [Link] | bash
yum install nodejs –y
useradd roboshop
mkdir /app
curl -o /tmp/[Link] [Link]
[Link]/[Link]
cd /app
unzip /tmp/[Link]
cd /app
npm install
/etc/systemd/system/[Link]
[Unit]
Description = Catalogue Service
[Service]
User=roboshop
Environment=MONGO=true
Environment=MONGO_URL="mongodb://<MONGODB-SERVER-IPADDRESS>:27017/catalogue"
ExecStart=/bin/node /app/[Link]
SyslogIdentifier=catalogue
[Install]
WantedBy=[Link]
systemctl daemon-reload
systemctl enable catalogue
systemctl start catalogue
git commands:
1. git init: Initializes a new Git repository.
2. git clone: Makes a copy of a remote repository on your local machine.
3. git add: Adds changes to the staging area.
4. git commit: Saves changes to the local repository.
5. git push: Uploads local repository content to a remote repository.
6. git pull: Downloads remote repository content to the local repository.
7. git status: Displays the status of the working directory and the staging area.
8. git branch: Lists all the branches in the repository.
9. git checkout: Switches to a different branch.
10. git merge: Merges changes from one branch into another.
11. git log: Shows the commit history of the repository.
12. git stash: Temporarily saves changes that are not ready to be
committed.