-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds ability to configure multiple servers
You can now configure and use mutliple servers and deply to any of them by name. Example below: phploy -s staging Or: phploy --server staging Hope it helps: fixes #1 Signed-off-by: Baki Goxhaj <[email protected]>
- Loading branch information
Showing
3 changed files
with
117 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
; This is a sample deploy.ini file. | ||
; You can specify as many servers as you need | ||
; and use whichever configuration way you like. | ||
|
||
[example] | ||
[staging] | ||
|
||
skip = false | ||
user = example | ||
pass = password | ||
host = example.com | ||
host = staging-example.com | ||
path = /path/to/installation | ||
port = 21 | ||
passive = true | ||
|
||
|
||
[production] | ||
|
||
user = example | ||
pass = password | ||
host = production-example.com | ||
path = /path/to/installation | ||
port = 21 | ||
passive = true | ||
|
||
; If that seemed too long for you, you can specify servers like this: | ||
[ftp://example:[email protected]:21/path/to/installation] | ||
; If that seemed too long for you, you can use quickmode instead: | ||
[quickmode] | ||
staging = ftp://example:[email protected]:21/path/to/installation | ||
production = ftp://example:[email protected]:21/path/to/installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,25 +19,51 @@ As any script, you can use PHPloy globally, from your `bin` directory or locally | |
|
||
## deploy.ini | ||
|
||
The `deploy.ini` file hold your credentials and it must be in the root directory of your project. | ||
|
||
; Deploy Settings | ||
|
||
[Production] | ||
|
||
skip = false | ||
user = example | ||
pass = password | ||
host = example.com | ||
port = 21 | ||
path = /path/to/installation | ||
passive = true | ||
|
||
; If that seemed too long for you, you can specify servers like this: | ||
[ftp://example:[email protected]:21/path/to/installation] | ||
The `deploy.ini` file hold your credentials and it must be in the root directory of your project. Use as many servers as you need and whichever configuration type you prefer. | ||
|
||
; This is a sample deploy.ini file. | ||
; You can specify as many servers as you need | ||
; and use whichever configuration way you like. | ||
|
||
[staging] | ||
|
||
user = example | ||
pass = password | ||
host = staging-example.com | ||
path = /path/to/installation | ||
port = 21 | ||
passive = true | ||
|
||
[production] | ||
|
||
user = example | ||
pass = password | ||
host = production-example.com | ||
path = /path/to/installation | ||
port = 21 | ||
passive = true | ||
|
||
; If that seemed too long for you, you can use quickmode instead: | ||
[quickmode] | ||
staging = ftp://example:[email protected]:21/path/to/installation | ||
production = ftp://example:[email protected]:21/path/to/installation | ||
|
||
|
||
The first time it's executed, PHPloy will assume that your deployment server is empty, and will upload all the files of your project. | ||
|
||
## Specify Server | ||
|
||
PHPloy allows you to configure multilple servers in the deploy file and deploy to any of them with ease. By default it will deploy to all specified servers. | ||
To specify one server run: | ||
|
||
phploy -s servername | ||
|
||
Or: | ||
|
||
phploy --server servername | ||
|
||
`servername` stands for the name you have given to the server in the `deploy.ini` configuration file. | ||
|
||
## View files | ||
|
||
PHPloy allows you to check out what are going to be uploaded/deleted before you actually push them. Just run: | ||
|