@alfonz/deployer
v1.1.2
Published
Simple utility for deploying (primarily Node.js) applications from git repository.
Downloads
5
Readme
Deployer
Simple utility for deploying (primarily Node.js) applications from git repository.
Getting started
Add deploy script to your repository:
# deploy.sh
yarn
yarn build
Create deployer.json
config file in server directory:
{
"repo": "[email protected]:AlfonzAlfonz/deployer.git",
"build": "bash deploy.sh"
}
Run deployer to create a new release:
npx @alfonz/deployer
Deployer by default creates a ./releases
directory with release folders and creates symlink to ./current
after successful deploy.
Config options
| Name | Default Value | Description | |-----------|---------------|-----------------------------------------------| | repo | | Repo uri (required) | | releases | './releases' | Folder containing release folders | | current | './current' | Symlink to current release | | branch | | Branch name | | build | | Build command | | onSuccess | | Command which is ran after successful release | | maxCount | 3 | Max count of releases in releases folder |
Example config
{
"releases": "./releases",
"current": "./current",
"repo": "[email protected]:AlfonzAlfonz/deployer.git",
"branch": "main",
"build": "bash deploy.sh",
"limit": 3
}