-
Notifications
You must be signed in to change notification settings - Fork 4
/
Deployment.txt
61 lines (49 loc) · 2.04 KB
/
Deployment.txt
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
Automatic Deployment From GitHub
apache2
Ruby on rails: used to implement the design of the site
postgresql : an object-relational database (ORDBMS)
Github Repo: https://github.com/ztbc68/OCDX-Engine-Group5
need install apache2 ,RubyOnRails and postgresql and clone our github repo to localhost.
Postgresql :sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
apache2: sudo apt-get update
sudo apt-get install apache2
Ruby: sudo apt-get update
sudo apt-get install curl
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.3.1
rvm use 2.3.1 --default
ruby -v
Install Bundler
gem install bundler
Configure Git
git config --global user.name "YOUR NAME"
git config --global user.email [email protected]
Install NodeJS
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Install Rails
gem install rails -v 4.2.6
Clone the Github Repo
git clone https://github.com/ztbc68/OCDX-Engine-Group5.git
Setup PostgreSQL
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.5 libpq-dev
sudo -u postgres createuser -s Ubuntu
Setup Rails App
cd
cd OCDX-Engine-Group5/RoR/OCDXEngine_Final/
bundle install
rake db:create
rake db:migrate
Launch Rails App
rails s -p 3000 -b 0.0.0.0
To stop server, use Ctrl + c
To view site, go to ec2-##-###-###-###.us-west-2.compute.amazonaws.com:3000
To run site until server shuts down, run command: rails s -p 3000 -b 0.0.0.0 -d