- Create databases
CREATE DATABASE electron_release_server ;
-
Create 'electron_release_server_user' user
-
Grant 'OWNER' level permissions for the user for the database above (all permission except GRANT OPTION)
*A database schema will be created automatically once the application starts.
- Install GIT
sudo apt-get install git
- Create a directory for an application
mkdir electron-release-server
- Clone a repository
GIT_SSL_NO_VERIFY=1
git clone https://<user_name>@git.epam.com/mrc-assy/electron-release-server.git
- Install latest version of NodeJS
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs -y
nodejs -v # should be 8.3.0 or higher
npm -v #should be 5.3.0 or higher
- Install Required NPM modules
npm install
- Define environment variables
NODE_ENV=production
- Update configuration files
// config/connection.js
mysqlServer: {
adapter: 'sails-mysql',
host: 'localhost',
user: 'electron_release_server_user',
password: '<password>',
database: 'electron_release_server'
},
// config/files.js
dirname: '~/electron-release-server/assets'
// config/env/production.js
module.exports = {
models: {
connection: 'mysqlServer',
migrate: 'safe'
},
port: 80,
log: {
level: "silent"
},
appUrl: 'http://<your host name>',
auth: {
static: {
username: 'admin',
password: '<your password>'
},
secret: '2xSqEsM4dtYQcNd5V6FBJHsqzMMOHkftiCviyzUlvtZ2kX88FB7kfhZTYJo2daj'
},
jwt: {
token_secret: 'pCGoKop8bsyp9avlngPSPVw2hitfi0VGgVjjAygYLKTonXsYq0xa4uGKbSt6JFP'
}
};
- Start an application
sudo npm start --prod
Original documentation for the project could be found here.
You should keep your fork up to date with the electron-release-server master.
Doing so is simple, rebase your repo using the commands below.
git remote add upstream https://github.com/ArekSredzki/electron-release-server.git
git fetch upstream
git rebase upstream/master