Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

Bitbucket Repository: https://bitbucket.org/fleetph/fleet-forms/src/master/

Developer Setup


Requirements

  • Node JS 10+

  • Firebase CLI

  • NPM/Yarn

  • Firebase Console Access

  • Bitbucket Access

  1. Set up ssh with Bitbucket if you haven’t yet. Visit the following link: Bitbucket SSH Setup

  2. Clone the repo

    git clone git@bitbucket.org:fleetph/fleet-forms.git
  3. Install dependencies.

    yarn install
  4. Run development server.

    1. Development of API - the web will not hot-reload

      yarn dev:start
    2. Development of Web - web will hot-reload but you will have to pass dummy data to the components

      yarn start

* suggestion for future developers, use concurrently to run web and API server simultaneously.

Deployment


 Deployment for Beta environment - Nexus2
  1. Login to the server using the following command

    ssh ctodev@beta.ctoglobal.co
  2. This will prompt you to enter the password. (ask the administrator or your team lead for the password)

    1. Note: I recommend using snowflakes ssh manager. https://github.com/subhra74/snowflake

  3. Once logged in. Navigate to the apps folder.
    cd apps

  4. Then navigate to fleet-forms
    cd fleet-forms

  5. checkout to the branch that you want to deploy
    git checkout beta-branch-name

  6. Update the branch
    git pull

  7. install dependencies
    yarn install

  8. Build the project
    yarn beta:build

  9. Restart Fleet-forms server process
    pm2 restart fleet-forms

  10. Check your deployment @ NEXUS 2

 Deployment to Staging environment - Solutions PH
  1. Ask our system administrator to have your IP whitelisted from the server.

  2. Login to the server using the following command

    ssh root@209.97.168.234
  3. This will prompt you to enter the password. (ask the administrator or your team lead for the password)

    1. Note: I recommend using snowflakes ssh manager. https://github.com/subhra74/snowflake

    2. If you’re not whitelisted, this part right here will fail even if you enter the correct password.

  4. Once logged in. Navigate to the apps folder.
    cd apps

  5. Navigate to the staging folder
    cd staging

  6. Then navigate to fleet-forms
    cd fleet-forms

  7. Check out to the master branch. We only deploy the master branch to staging.
    git checkout master

  8. Update the branch
    git pull origin master

  9. Install dependencies
    yarn install

  10. Build the project
    yarn staging:build

  11. Restart Fleet-forms server process
    pm2 restart fleet-forms:staging

  12. Check your deployment @ https://solutions.fleet.ph:5053/forms

 Deployment to Production environment - Solutions PH
  1. Ask our system administrator to have your IP whitelisted from the server.

  2. Login to the server using the following command

    ssh root@209.97.168.234
  3. This will prompt you to enter the password. (ask the administrator or your team lead for the password)

    1. Note: I recommend using snowflakes ssh manager. https://github.com/subhra74/snowflake

    2. If you’re not whitelisted, this part right here will fail even if you enter the correct password.

  4. check the current version of production
    cd ~/apps/production/fleet-forms && git rev-parse --abbrev-ref HEAD

  5. run deployment script. increment the last version from step 4. This will deploy from master branch then create a release version. *1.2 is just a sample incremented version
    sh ~/deployments/prod.sh fleet-forms 1.2 fleet-forms

  6. Check your deployment @ https://solutions.fleet.ph:5055/forms

  • No labels