Simple deployment automation & continuous delivery for Node.js projects.
Services like DigitalOcean's droplets and Linode's linodes make it super easy to create deployment targets for websites and other Node.js projects. However, there are still a lot of manual steps developers have to do in order to ship the app: install Node, install a runner like pm2
or forever
, install system security patches, zip up & upload the app, create the necessary target directories, and more.
Once you define a single configuration .rocketryrc
file, you can run npx deploy run
and everything will be handled for you. Then, with a few other small steps, you can automate the entire process via a CI tool so deployments occur automatically anytime you push changes to your master
branch.
For instructions on how to use the tool, see /docs.
These are the goals for this project:
- Installation & setup of target server
- Install
node
and upgrade it to the latest version - Install
yarn
and upgrade it to the latest version - Install
pm2
and upgrade it to the latest version - Upgrade
apt-get
packages to ensure the latest system security patches are installed
- Install
- Automation of deployment steps
- Create target directories on target server
- Upload local project files to target server via SSH
- Install/upgrade
node
dependencies on target server - Start/restart of services on target server
- Start the application if it's the first deployment, otherwise restart it for updates
- Integration with CI systems for automated deployment triggers
- Automated deployments via username & password
- Automated deployments via SSH key
- Seamless deployments without downtime
How does this project differ from similar existing public projects?
Netlify
- It's incredible, but not free past a certain pointVercel
- Also incredible, but not free past a certain pointdploy
- Doesn't support server-side package upgradesdployr
- Assumes the Git project is accessible from the servershipit
- JavaScript-based (as opposed to configuration-based) and doesn't support server-side package upgradeszaz
- Assumes the Git project is accessible from the server
Contributions for bug fixes and new features are welcome via Pull Requests.
- Set the version you want in
package.json
(or leave it as is for an auto patch version bump) - Set the same version in
CHANGELOG.md
and put today's date and changes - Run
npm run release
- Set the next version in
package.json
- Add the next block to the
CHANGELOG.md
- Set git tag on the released commit
To simulate a deployment (to test the script), clone this project and run:
yarn start
MIT