j-fnd
v2.0.4
Published
- Install package ``npm i j-fnd`` - Create jFnd.js file inside the root of the project --You can add custom actions and specify configurations inside this file. ``` const deployCfg = { //REQUIRED deployUser: "", //REQUIRED
Downloads
2
Readme
Nodejs ssh deploy
- Install package
npm i j-fnd
- Create jFnd.js file inside the root of the project
--You can add custom actions and specify configurations inside this file.
const deployCfg = { //REQUIRED deployUser: "", //REQUIRED appName: "", //REQUIRED serverIp: "", //REQUIRED repoUrl: "", //REQUIRED deployFolder: "", //REQUIRED options -> production, staging env: "production", //REQUIRED if env is production productionBranch: "", //REQUIRED if env is staging stagingBranch: "", //REQUIRED appStartupFile: "", //OPTIONAL linkedFolders: [], //OPTIONAL linkedFiles: ["config/environment.yaml"], //REQUIRED hostName: "foobar.com", //REQUIRED port: 3001, //REQUIRED location: "" } exports.deployCfg = deployCfg; exports.startup = async (shipit) => { await shipit.remote( `cd ${shipit.currentPath} && DB_ENV=deploy pm2 start --name ${deployCfg.appName} ${deployCfg.appStartupFile} --env production` ); }; exports.beforeNodeModulesInstall = async (shipit) => { await Promise.resolve(); }; exports.afterNodeModulesInstall = async (shipit) => { await shipit.remote(`cd ${shipit.currentPath} && npm run build`); await shipit.remote(`cd ${shipit.currentPath} && DB_ENV=deploy npm run db:migrate`); };