Minimalistic deployment shell script, it run in server.
The project fork from deploy, the original project put the shell script on the local computer, and remotely executes commands through SSH; this shell script is placed on the remote server for direct execution
$ make install
Visit the original wiki for additional usage information.
Usage: deploy [options] <env> [command]
Options:
-C, --chdir <path> change the working directory to <path>
-c, --config <path> set config path. defaults to ./deploy.conf
-T, --no-tests ignore test hook
-V, --version output program version
-h, --help output help information
Commands:
setup run remote setup commands
revert [n] revert to [n]th last deployment or 1
config [key] output config file or [key]
curr[ent] output current release commit
prev[ious] output previous release commit
exec|run <cmd> execute the given <cmd>
list list previous deploy commits
[ref] deploy to [ref], the 'ref' setting, or latest tag
By default deploy(1)
will look for ./deploy.conf, consisting of one or more environments, [stage]
, [production]
, etc, followed by directives.
[stage]
repo git@github.com:visionmedia/express.git
path /var/www/myapp.com
ref origin/master
post-deploy /var/www/myapp.com/update.sh
When specified, HEAD is reset to ref
. When deploying
production typically this will not be used, as deploy(1)
will
utilize the most recent tag by default, however this is useful
for a staging environment, as shown below where HEAD is updated
and set to the develop branch.
ref origin/develop
GIT repository to clone.
repo git@github.com:visionmedia/express.git
Deployment path.
path /var/www/myapp.com
All hooks are arbitrary commands, executed relative to path/current
,
aka the previous deployment for pre-deploy
, and the new deployment
for post-deploy
. Of course you may specify absolute paths as well.
pre-deploy ./bin/something
post-deploy ./bin/restart
Post-deployment test command after post-deploy
. If this
command fails, deploy(1)
will attempt to revert to the previous
deployment, ignoring tests (for now), as they are assumed to have run correctly.
test ./something
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。