Skip to content

Commit e0944e7

Browse files
committed
Updated README
1 parent fa313c2 commit e0944e7

1 file changed

Lines changed: 18 additions & 45 deletions

File tree

README.md

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Deployer
22

3-
Deploy [dokku](http://dokku.viewdocs.io/dokku/) applications using [GitHub Deployments API](https://developer.github.com/v3/repos/deployments/).
3+
Deploy applications using [GitHub Deployments API](https://developer.github.com/v3/repos/deployments/).
44

55
1. Listen/poll new GitHub deployments
66
2. Create pending GitHub deployment status and empty Gist
7-
3. Deploy application to dokku
7+
3. Execute command file that deploys application
88
4. Create success/failure Github deployment status and update Gist
99
5. Sleep 30 seconds
1010
6. Go to step #1
1111

12-
Make sure to run `deployer` as `dokku` user.
13-
14-
To register github deployments you can use [deploy](https://github.com/remind101/deploy),
12+
To register github deployments you can use curl,
1513
[slashdeploy](https://github.com/remind101/slashdeploy) or something else.
1614

1715
If you are using Slack, you can enable 'Deploy Events -> Show deployment statuses'
@@ -24,59 +22,34 @@ deployer -h
2422
```
2523

2624
```
27-
-app string
28-
Dokku application name (required)
2925
-env string
30-
Github deployment environment (required)
26+
Github deployment environment (required)
27+
-file string
28+
File to execute when new deployment is available (required)
3129
-org string
32-
GitHub org (required)
30+
GitHub org (required)
3331
-p string
34-
GitHub password (required)
32+
GitHub password (required)
3533
-repo string
36-
GitHub repo (required)
34+
GitHub repo (required)
3735
-sleep int
38-
Time to sleep between loops (defaults to 30 seconds) (default 30)
36+
Time to sleep between loops (defaults to 30 seconds) (default 30)
3937
-u string
40-
GitHub username (required)
41-
```
42-
43-
## Installation
44-
45-
Install `deployer` on dokku server:
46-
47-
```bash
48-
$ su - dokku
49-
$ curl -L -o deployer https://github.com/mak-it/deployer/releases/download/v0.1.2/deployer-linux-amd64
50-
$ chmod +x deployer
51-
```
52-
53-
Start `deployer` on system reboot using `cron` and `screen`:
54-
55-
```bash
56-
$ su - dokku
57-
$ echo "@reboot /usr/bin/screen -d -m /home/dokku/deployer -u ghuser -p ghpass -org mak-it -repo myapp -env demo -app myapp-demo -sleep 30" | crontab -
58-
```
59-
60-
Start `deployer` in `screen`:
61-
62-
```bash
63-
$ su - dokku
64-
$ /usr/bin/screen -d -m /home/dokku/deployer -u ghuser -p ghpass -org mak-it -repo myapp -env demo -app myapp-demo -sleep 30
38+
GitHub username (required)
6539
```
6640

6741
## Example
6842

6943
Trigger deployment from developer's machine:
7044

7145
```bash
72-
$ cd ~/src/myapp
7346
$ deploy --branch v49.3 --env demo
7447
```
7548

76-
On the dokku server:
49+
On the application server:
7750

7851
```bash
79-
$ deployer -u ghuser -p ghpass -org mak-it -repo myapp -env demo -app myapp-demo -sleep 30
52+
$ deployer -u ghuser -p ghpass -org mak-it -repo myapp -env demo -file bin/deploy-stub -sleep 30
8053
```
8154

8255
Output:
@@ -85,19 +58,19 @@ Output:
8558
Deployer
8659
ghuser ghpass mak-it myapp demo myapp-demo
8760
Sleep duration: 30s
88-
2017/08/24 13:31:43 Cloning repo
89-
2017/08/24 13:31:51 Adding repo dokku remote .myapp-demo myapp-demo
9061
2017/08/24 13:32:52 Getting deployment demo
9162
2017/08/24 13:32:53 Problem in getting deployment Deployment statuses already present
9263
2017/08/24 13:32:53 Sleeping 30s
9364
2017/08/24 13:33:23 Getting deployment demo
9465
2017/08/24 13:33:23 123 v49.3 demo
95-
2017/08/24 13:33:23 Fetchin repo .myapp-demo
9666
2017/08/24 13:33:24 Gist create ID: 123, Ref: v49.3, Environment: demo
9767
2017/08/24 13:33:25 Gist https://gist.github.com/...
9868
2017/08/24 13:33:25 Deployment status create pending
99-
2017/08/24 13:33:26 Deploying repo .myapp-demo
100-
Everything up-to-date
69+
2017/08/24 13:33:26 Executing File bin/deploy-stub
70+
-----> Adding BUILD_ENV to build environment...
71+
-----> Compiling Ruby/Rails
72+
=====> Application deployed:
73+
http://ruby-rails-sample.dokku.me
10174
2017/08/24 13:33:26 Deployment status create success
10275
2017/08/24 13:33:26 Gist update
10376
```

0 commit comments

Comments
 (0)