-
Notifications
You must be signed in to change notification settings - Fork 10
/
install_linux.sh
54 lines (39 loc) · 1.36 KB
/
install_linux.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
#!/bin/bash
set -eo pipefail
## Install Go
curl https://raw.githubusercontent.com/elimisteve/install-go/master/install-go.sh | bash
export GOROOT=~/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin
## Install git
sudo apt-get update
sudo apt-get install -y git
## Get `effective`
go get github.com/EffectiveAF/effective
## Get Node
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
## Install create-react-app
sudo npm install -g create-react-app
## Install Postgres
sudo apt-get install -y postgresql postgresql-contrib
## Download and unpack PostgREST
cd $(go env GOPATH)/src/github.com/EffectiveAF/effective/db && \
sudo -u postgres bash init_sql.sh && \
wget https://github.com/begriffs/postgrest/releases/download/v0.4.3.0/postgrest-v0.4.3.0-ubuntu.tar.xz && \
tar xvf postgrest-v0.4.3.0-ubuntu.tar.xz
echo '# Install complete! Now run
source ~/.bashrc
cd $(go env GOPATH)/src/github.com/EffectiveAF/effective/db
./postgrest postgrest.conf
# in this terminal. In a new terminal, run
cd $(go env GOPATH)/src/github.com/EffectiveAF/effective
npm install
npm run build
go build
./effective
# and Effective should be up and running on localhost:8082.
#
# See README.md for how to set up a production deployment that creates
# an auto-renewing HTTPS cert, uses secure headers, and more.'