Step-by-step instructions to setup a Scalra system from scratch on a Ubuntu System (you may skip steps if they're already performed on your local system)
-
Install node.js LTS (4.5.0)
sudo apt-get install node
-
Install MongoDB or type
sudo apt install mongodb
MongoDB by default does not have an admin account, but it is better for security measures. This also allows Scalra to create DB on the fly for you.
-
Install Mongo client
sudo apt-get install mongodb-clients
-
Setup MongoDB admin account
$mongo
then type:
use admin
db.createUser(
{
user: "dbadmin",
pwd: "dbadmin-pass",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
}
)
note: please change user / pwd to your preferred DB admin account and password (need to match /settings.js)
-
clone the project's git repo
git clone https://github.com/your_org/your_project.git
-
create local copy of settings.js
cd your_project; cp settings.js.example settings.js
-
install required libs
npm install
-
(optional) setup SSH keys If you need to run HTTPS services, make sure you've put the correct & relevant files under the /keys directory, for example:
keys: {
privatekey: __dirname + '/keys/privatekey.pem',
certificate: __dirname + '/keys/certificate.pem'
}
or point to specific directories where the key files exist. For example:
keys: {
privatekey: '/etc/letsencrypt/live/privkey.pem',
certificate: '/etc/letsencrypt/live/fullchain.pem'
}
npm start