You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
3
3
After [installation](installation.md) of Deployer you will have the ability to run the `dep` command from your terminal.
4
4
5
-
To get list of all available tasks run the `dep` command. You can run it from any subdirectories of you project;
6
-
Deployer will automatically find project root dir.
7
-
8
-
~~~bash
5
+
To get list of all available tasks run the `dep` command. You can run it from any subdirectories of you project;
6
+
Deployer will automatically find project root dir.
7
+
8
+
```bash
9
9
Deployer
10
10
11
11
Usage:
@@ -28,19 +28,19 @@ Available commands:
28
28
run Run any arbitrary command on hosts
29
29
self-update Updates deployer.phar to the latest version
30
30
ssh Connect to host through ssh
31
-
~~~
31
+
```
32
32
33
33
The best way to configure your `deploy.php` is to automatically deploy to staging on this command:
34
-
35
-
~~~bash
34
+
35
+
```bash
36
36
dep deploy
37
-
~~~
37
+
```
38
38
39
39
This is so somebody can't accidentally deploy to production (for production deployment, the `dep deploy production` command explicitly lists the required production stage).
40
40
41
41
You need info about available options and usage use the `help` command:
42
-
43
-
~~~bash
42
+
43
+
```bash
44
44
$ dep help deploy
45
45
Usage:
46
46
deploy [options] [--] [<stage>]
@@ -67,62 +67,62 @@ Options:
67
67
--revision[=REVISION] Revision to deploy
68
68
--branch[=BRANCH] Branch to deploy
69
69
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
70
-
70
+
71
71
Help:
72
72
Deploy your project
73
-
~~~
73
+
```
74
74
75
75
### Overriding configuration options
76
76
77
77
For example, if your _deploy.php_ file contains this configuration:
78
78
79
-
~~~php
79
+
```php
80
80
set('ssh_multiplexing', false);
81
-
~~~
81
+
```
82
82
83
83
And you want to enable [ssh multiplexing](https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing) without modifying the file, you can pass the `-o` option to the `dep` command:
84
84
85
-
~~~bash
85
+
```bash
86
86
dep deploy -o ssh_multiplexing=true
87
-
~~~
87
+
```
88
88
89
89
To override multiple config options, you can pass multiple `-o` args:
90
90
91
-
~~~bash
91
+
```bash
92
92
dep deploy -o ssh_multiplexing=true -o branch=master
93
-
~~~
93
+
```
94
94
95
95
### Running arbitrary commands
96
-
96
+
97
97
Deployer comes with a command to run any valid command on you server without modifying _deploy.php_
98
-
99
-
~~~bash
98
+
99
+
```bash
100
100
dep run 'ls -la'
101
-
~~~
101
+
```
102
102
103
103
To specify the hosts this command has the corresponding options:
104
104
105
-
~~~
105
+
```
106
106
--stage=STAGE Stage to deploy
107
107
--roles=ROLES Roles to deploy
108
108
--hosts=HOSTS Host to deploy, comma separated, supports ranges [:]
109
-
~~~
109
+
```
110
110
111
111
### Getting help
112
112
113
113
You can get more info about any commands by using the help command:
114
114
115
-
~~~
115
+
```bash
116
116
dep help [command]
117
-
~~~
117
+
```
118
118
119
119
### Autocomplete
120
120
121
121
Deployer comes with an autocomplete script for bash/zsh/fish, so you don't need to remember all the tasks and options.
0 commit comments