-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitializing.sh
More file actions
executable file
·47 lines (44 loc) · 1.41 KB
/
initializing.sh
File metadata and controls
executable file
·47 lines (44 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/bash
# This script is used to initialize the environment for the first time
#update the system
sudo apt-get update
sudo apt-get upgrade
#install docker
if ! command -v docker &> /dev/null
then
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
else
echo "Docker is already installed"
fi
#install docker-compose
if ! command -v docker-compose &> /dev/null
then
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
else
echo "Docker Compose is already installed"
fi
#install nginx
if ! command -v nginx &> /dev/null
then
sudo apt-get install nginx
else
echo "Nginx is already installed"
fi
# #install mongodb
# if ! command -v mongo &> /dev/null
# then
# sudo apt-get install -y mongodb
# else
# echo "MongoDB is already installed"
# fi
#make a directory for the project
mkdir Reddit-Clone
cd Reddit-Clone
git clone https://github.com/Team4-DevWave/Frontend.git
git clone https://github.com/Team4-DevWave/Backend.git
git clone https://github.com/Team4-DevWave/Devops.git