obrand installer
This commit is contained in:
parent
823c39ec65
commit
a0c1af2aa5
57
scripts/obrand_install.sh
Normal file
57
scripts/obrand_install.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Update initial packages
|
||||
sudo apt-get -y --force-yes update
|
||||
sudo apt-get -y --force-yes upgrade
|
||||
|
||||
# install apps
|
||||
sudo apt-get --assume-yes install build-essential git nginx htop screen wget curl
|
||||
|
||||
# set up and install swap file
|
||||
sudo swapon -s
|
||||
sudo fallocate -l 1G /swapfile
|
||||
sudo chmod 600 /swapfile
|
||||
sudo mkswap /swapfile
|
||||
sudo swapon -s
|
||||
sudo swapon /swapfile
|
||||
|
||||
# setup node and npm
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
|
||||
source .bashrc
|
||||
nvm install v5.7.0
|
||||
npm install -g gulp bower pm2 npm-check npm-install-missing ember-cli phantomjs
|
||||
|
||||
# get source and build
|
||||
mkdir ~/live
|
||||
mkdir ~/dev && cd ~/dev
|
||||
|
||||
# Get latest version of Obrand Admin
|
||||
git clone https://censis.visualstudio.com/DefaultCollection/_git/O-Brand
|
||||
|
||||
# Get latest version of Obrand Admin Server
|
||||
git clone http://gitlab.silvrtree.co.uk/martind2000/obrand-admin-server.git
|
||||
|
||||
cd ~/dev/O-Brand
|
||||
|
||||
npm install .
|
||||
npm-install-missing
|
||||
bower install
|
||||
ember build --environtment production
|
||||
|
||||
cd ~/dev/obrand-admin-server
|
||||
|
||||
npm install . && npm-install-missing
|
||||
|
||||
cd ~/dev/O-Brand/dist
|
||||
cp -ra . ~/dev/obrand-admin-server/wwwroot
|
||||
|
||||
cd ~/dev/obrand-admin-server
|
||||
cp -ra . ~/live
|
||||
|
||||
# Configure nginx
|
||||
sudo fuser -k 80/tcp
|
||||
|
||||
sudo wget https://dl.dropboxusercontent.com/u/233909/obrand/obrand.nginx -O /etc/nginx/sites-available/obrand && sudo ln -s /etc/nginx/sites-available/obrand /etc/nginx/sites-enabled/obrand
|
||||
|
||||
sudo service restart nginx
|
||||
|
Loading…
Reference in New Issue
Block a user