Beanstalk Code Deployment Process

WordPress, Drupal, Cakephp, Laravel.

 

  • Request a new Beanstalk repository: Members should raise an osticket to request a new repository for each project.
  • Repository creation and information sharing: The server team will create the repository and share the details via osticket, including the port number that developers need to use in their code.
  • Code pushing: Developers will push their code from their local system to the Beanstalk repository.
  • Repository server settings adjustment: After code is pushed, the server team will make necessary adjustments to the repository server settings, including the server IP, path, username, and ssh key.
  • Deployment notification: If the server settings are correct, the server team will inform developers to deploy the code on the server.
  • Testing and bug fixing: Developers will test the app on the live server and raise an osticket to the server team in case of any issues. The server team will work on resolving the issues as soon as possible, if required will inform developers for making changes to the code or settings if necessary.
  • Continual improvement: This process will continue until the app is functioning as expected and all issues are resolved. The server team will inform developers to retest the app on the live server after the issues are resolved.

 

React, Node – Express, React native

Manual process

  • Request a new Beanstalk repository: Members should raise an osticket to request a new repository for each project.
  • Repository creation and information sharing: The server team will create the repository and share the details via osticket, including the port number that developers need to use in their code.
  • Code pushing: Developers will push their code from their local system to the Beanstalk repository.
  • Repository server settings adjustment: After code is pushed, the server team will make necessary adjustments to the repository server settings, including the server IP, path, username, and ssh key.
  • Deployment notification: If the server settings are correct, the server team will inform developers to deploy the code on the server.
  • Code deployment and app activation: The server team will run the necessary commands on the server which the developer will have to mention in the configuration file to make the application live after successful deployment of code and will inform the developers.
  • Testing and bug fixing: Developers will test the app on the live server and raise an osticket to the server team in case of any issues. The server team will work on resolving the issues as soon as possible, if required will inform developers for making changes to the code or settings if necessary.
  • Continual improvement: This process will continue until the app is functioning as expected and all issues are resolved. The server team will inform developers to retest the app on the live server after the issues are resolved.

Automated process

 

  • Request a new Beanstalk repository: Members should raise an osticket to request a new repository for each project.
  • Repository creation and information sharing: The server team will create the repository and share the details via osticket, including the port number that developers need to use in their code.
  • Code pushing: Developers will push their code from their local system to the Beanstalk repository.
  • Repository server settings adjustment: After code is pushed, the server team will make necessary adjustments to the repository server settings, including the server IP, path, username, and ssh key.
  • Deployment notification: If the server settings are correct, the server team will inform developers to deploy the code on the server.
  • Code deployment and app activation: Before pushing the code developers will have to make some changes in the package.json file which will run the command automatically during the beanstalk deployment process and also add a restart command in Post-deployment commands section (eg. npm run live_restart_server) of server settings  which will make the application live.
  • Testing and bug fixing: Developers will test the app on the live server and raise an osticket to the server team in case of any issues. The server team will work on resolving the issues as soon as possible, if required will inform developers for making changes to the code or settings if necessary.
  • Continual improvement: This process will continue until the app is functioning as expected and all issues are resolved. The server team will inform developers to retest the app on the live server after the issues are resolved.

 

Pm2.json file example

{

  “apps”: [

    {

      “name”: “server”,

      “script”: “index.js”,

      “env”: {

        “NODE_ENV”: “production”

      }

    }

  ]

}

 

Package.json file example

  {

  “name”: “rechat-server”,

  “version”: “1.0.0”,

  “description”: “”,

  “main”: “index.js”,

  “type”: “module”,

  “scripts”: {

    “test”: “echo \”Error: no test specified\” && exit 1″,

    “start”: “.\”/node_modules/.bin/pm2\” start pm2.json”,

    “restart”: “.\”/node_modules/.bin/pm2\” restart pm2.json”,

    “stop”: “.\”/node_modules/.bin/pm2\” delete pm2.json”,

    “server”: “nodemon index.js”,

    “live_start_server”: “npm install && npm start”,

    “live_restart_server”: “npm install && npm restart”

  },

  “author”: “”,

  “license”: “ISC”,

  “dependencies”: {

    “bcryptjs”: “^2.4.3”,

    “colors”: “^1.4.0”,

    “cors”: “^2.8.5”,

    “dotenv”: “^16.0.3”,

    “express”: “^4.18.2”,

    “express-async-handler”: “^1.2.0”,

    “http”: “^0.0.1-security”,

    “http-status-codes”: “^2.2.0”,

    “jsonwebtoken”: “^9.0.0”,

    “mongodb”: “^4.13.0”,

    “mongoose”: “^6.8.1”,

    “nodemon”: “^2.0.20”,

    “openai”: “^3.1.0”,

    “pm2”: “^3.5.1”,

    “puppeteer”: “^19.7.2”,

    “stripe”: “^11.9.1”,

    “validator”: “^13.7.0”

  }

}

 

Leave a Comment

Your email address will not be published. Required fields are marked *