Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views3 pages

Project

The document provides a step-by-step guide for setting up a frontend server using Nginx, configuring a reverse proxy, and installing MongoDB and a catalogue service. It includes commands for installing necessary packages, configuring services, and managing a Git repository. Additionally, it outlines essential Git commands for version control and repository management.

Uploaded by

Siva Rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Project

The document provides a step-by-step guide for setting up a frontend server using Nginx, configuring a reverse proxy, and installing MongoDB and a catalogue service. It includes commands for installing necessary packages, configuring services, and managing a Git repository. Additionally, it outlines essential Git commands for version control and repository management.

Uploaded by

Siva Rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Frontend commands:

yum install nginx –y


systemctl enable nginx
systemctl start nginx
rm -rf /usr/share/nginx/html/*
curl -o /tmp/frontend.zip https://roboshop-artifacts.s3.amazonaws.com/frontend.zip

cd /usr/share/nginx/html
unzip /tmp/frontend.zip
Create Nginx Reverse Proxy Configuration.

vim /etc/nginx/default.d/roboshop.conf
proxy_http_version 1.1;
location /images/ {
expires 5s;
root /usr/share/nginx/html;
try_files $uri /images/placeholder.jpg;
}
location /api/catalogue/ { proxy_pass http://localhost:8080/; }
location /api/user/ { proxy_pass http://localhost:8080/; }
location /api/cart/ { proxy_pass http://localhost:8080/; }
location /api/shipping/ { proxy_pass http://localhost:8080/; }
location /api/payment/ { proxy_pass http://localhost:8080/; }

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/yum.repos.d/mongo.repo
Add below lines

[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-
org/4.2/x86_64/
gpgcheck=0
enabled=1
yum install mongodb-org –y
systemctl enable mongod
systemctl start mongod
Update listen address from 127.0.0.1 to 0.0.0.0 in /etc/mongod.conf using vim
editor

systemctl restart mongod


Catlogue:
Install node.js
curl -sL https://rpm.nodesource.com/setup_lts.x | bash
yum install nodejs –y
useradd roboshop
mkdir /app
curl -o /tmp/catalogue.zip https://roboshop-
artifacts.s3.amazonaws.com/catalogue.zip
cd /app
unzip /tmp/catalogue.zip
cd /app
npm install
/etc/systemd/system/catalogue.service
[Unit]
Description = Catalogue Service

[Service]
User=roboshop
Environment=MONGO=true
Environment=MONGO_URL="mongodb://<MONGODB-SERVER-IPADDRESS>:27017/catalogue"
ExecStart=/bin/node /app/server.js
SyslogIdentifier=catalogue

[Install]
WantedBy=multi-user.target

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.

You might also like