This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-servers.sh
70 lines (51 loc) · 1.67 KB
/
setup-servers.sh
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env bash
## --- Clone the repositories for server --- ##
## --- 2017 --- ##
# check that the 2017 dir doesn't exist
#if [ ! -d '2017' ]; then
# cd /vagrant
# echo 'Grabbing 2017 repo from Github'
# sudo git clone https://github.com/ruhacks/2017-website 2017
# echo 'Creating copy of .env.template and renaming to .env'
# sudo cp /vagrant/2017/.env.template /vagrant/2017/.env
# if [ `command -v npm` != '' ]; then
# cd /vagrant/2017
# echo 'Installing node modules'
# sudo npm install
# fi
#fi
## --- 2018 --- ###
# check that the 2018 dir doesn't exist
if [ ! -d '2018' ]; then
cd /vagrant
mkdir 2018
echo 'Grabbing 2018 repo from Github'
sudo git clone https://github.com/ruhacks/ruhacks-2018-website-frontend 2018
echo '2018 frontend accessible now'
fi
## --- 2018 --- ###
# check that the 2018 dir doesn't exist
#if [ ! -d 'hackers' ]; then
# cd /vagrant
# mkdir hackers
# echo 'Grabbing hacker repo from Github'
# sudo git clone https://github.com/ruhacks/hacker-application hackers
#echo 'Creating copy of .env.template and renaming to .env'
#sudo cp /vagrant/2018/.env.template /vagrant/2018/.env
# if [ `command -v npm` != '' ]; then
# cd /vagrant/hackers
# echo 'Installing node modules'
# sudo npm install
# fi
# echo 'Please add in `firebase.json` to the Hackers applciation for it to run'
#fi
## --- Application startup --- ###
# check that the pm2 is installed
#if [ `command -v pm2` != '' ]; then
#cd /vagrant/2017
#echo 'Starting up 2017 server using pm2'
#sudo pm2 start server.js --name 2017
#cd /vagrant/hackers
#echo 'Starting up Hackers server using pm2'
#sudo pm2 start start.sh --name hackersClient
#fi