Skip to content

VictorHenriquez/pm2-meteor-deployment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

PM2 Meteor Deployment

Deploy your Meteor app with PM2. Based in @victorargento/pm2-deployment and @meteorengineer/setup-meteor

How to use the action?

steps:
  - uses: actions/checkout@v3
  
  - name: Deploy app
    uses: victorhenriquez/pm2-meteor-deployment@main
    with:
      remote-path: "/deployment/api"
      host: 12.34.56.78
      username: ${{ secrets.prod-user }}
      port: 2080
      password: ${{ secrets.prod-password }}
      pm2-id: "api"

How does it work?

The action does the following:

  1. Copies the repository contents to the remote server on the specified folder
  2. Runs npm ci
  3. Runs npm run build (optional)
  4. Runs pm2 reload the ecosystem.config.js
  5. Runs pm2 reset <id> to set 0 the number of restarts

Input arguments

  • remote-path - Where do you want to copy the files to?
  • host - _What's the host IP address?
  • username - What's the username that you're going to login into
  • port - What's the port of SSH? (default: 22)
  • password - What's the password of the user?`` (Note: in the future SSH Keys will be supported)
  • build - Build your typescript app
  • pm2-id - What's the ID/Name of the PM2 application?

Note: I recommend to use ecosystem.config.js in your project, you can envs, interpreters, node args, num of instances and more options. Here there are more content about it.

Good Practices: Why do I use reload instead restart? Restart is a hard way to stop and start a web server.

About

Deploy your Meteor app with PM2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%