Last active
October 21, 2017 18:01
-
-
Save Dasutin/643764bd8069ebf7063c7a9bc7f87893 to your computer and use it in GitHub Desktop.
Installing FlowBAT on Ubuntu 16.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Installing FlowBAT on Ubuntu 16.04 LTS ## | |
## Install whats needed ## | |
apt-get update | |
apt-get install build-essential checkinstall curl git-core mongodb-server nodejs | |
## Install nvm ## | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
## Backport nodejs to v0.10.48 ## | |
nvm install v0.10.48 | |
## Clone FlowBAT from GitHub ## | |
git clone https://github.com/chrissanders/FlowBAT.git | |
cd FlowBAT | |
## Install Meteor ## | |
curl https://install.meteor.com | /bin/sh | |
## Arrange for localhost configuration ## | |
cat /root/FlowBAT/private/bundle/settings/prod.sample.json | sed 's/flowbat.com/127.0.0.1:1800/' | sed 's/mailUrl.*/mailUrl": "",/' > /root/FlowBAT/private/bundle/settings/dev.json | |
## Install FlowBAT ## | |
cd /root/FlowBAT/private/bundle/programs/server && npm install | |
npm uninstall fibers | |
npm install fibers | |
## Setup FlowBAT to run as a service with systemd ## | |
vim /etc/systemd/system/flowbat.service | |
## Copy and paste the following in flowbat.service ## | |
[Unit] | |
Description=Starting FlowBAT | |
After=network.target | |
[Service] | |
EnvironmentFile=-/etc/systemd/system/flowbat.service.d/flowbat.conf | |
ExecStart=/root/.nvm/v0.10.48/bin/node /root/FlowBAT/private/bundle/main.js | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target | |
## Create the environment file ## | |
mkdir /etc/systemd/system/flowbat.service.d | |
vim /etc/systemd/system/flowbat.conf | |
## Copy and Paste in flowbat.conf ## | |
NODE_ENV=production | |
PORT=1800 | |
MONGO_URL=mongodb://localhost:27017/flowbat | |
ROOT_URL=http://127.0.0.1 | |
METEOR_SETTINGS='{"baseUrl": "http://127.0.0.1:1800","mailUrl": "","isLoadingFixtures": false,"apm": {"appId": "","secret": ""},"public": {"version": "FlowBAT v1.5.0","isDebug": false,"googleAnalytics": {"property": "","disabled": true},"mixpanel": {"token": "","disabled": false}}}' | |
## Initialize flowbat.service ## | |
chmod 644 /etc/systemd/system/flowbat.service | |
systemctl enable flowbat.service | |
systemctl daemon-reload | |
systemctl start flowbat.service | |
## If you want to start FlowBAT Manually and in the background ## | |
export PORT=1800 | |
export MONGO_URL=mongodb://localhost:27017/flowbat | |
export ROOT_URL=http://127.0.0.1 | |
export METEOR_SETTINGS=`cat /root/FlowBAT/private/bundle/settings/dev.json` | |
/root/.nvm/v0.10.48/bin/node /root/FlowBAT/private/bundle/main.js & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment