bricks-deploy 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +10 -19
- data/lib/bricks_deploy/generator.rb +1 -0
- data/lib/bricks_deploy/templates/after_push.sh +1 -0
- data/lib/bricks_deploy/templates/after_restart.sh +1 -1
- data/lib/bricks_deploy/templates/before_restart.sh +2 -2
- data/lib/bricks_deploy/templates/restart.sh +3 -2
- data/lib/bricks_deploy/templates/rollback.sh +3 -0
- data/lib/bricks_deploy/templates/setup.sh +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16dc7ba979ba4778e926a7dfc5f2eb4ca4c5e78
|
4
|
+
data.tar.gz: c39befb72cb7c65f72ec4e9655a1bd37fcea8761
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 371c5226c66542cd48db28360f83af4ca5a04e4b7d2f5f7aa66deb0580647d4ce6794b4c839b01a3303da583b2041b6f0e08e1581dabe759654cbde5efb7888e
|
7
|
+
data.tar.gz: 9cab34f2d6d20c9bf2527d388c78cb0e20ce9271e6b19b459c79c688c8ec0a40221559d12f4fc040e9d632db22878615c85c0e97a0ef829e75870c959e9a7e4a
|
data/README.markdown
CHANGED
@@ -38,11 +38,12 @@ Initial setup
|
|
38
38
|
2. Run the setup task:
|
39
39
|
|
40
40
|
```sh
|
41
|
-
git deploy setup -r "production"
|
41
|
+
git deploy setup -r "production" --stage "live" --color "twentysteps"
|
42
42
|
```
|
43
43
|
|
44
44
|
This will initialize the remote git repository in the deploy directory
|
45
|
-
(`/apps/mynewapp` in the above example)
|
45
|
+
(`/apps/mynewapp` in the above example), install the remote git hook and
|
46
|
+
output the string "live" in app/config/stage and "twentysteps" in app/config/color.
|
46
47
|
|
47
48
|
3. Run the init task:
|
48
49
|
|
@@ -50,9 +51,7 @@ Initial setup
|
|
50
51
|
git deploy init
|
51
52
|
```
|
52
53
|
|
53
|
-
This generates default deploy callback scripts in the `deploy/` directory.
|
54
|
-
You should check them in git because they are going to be executed on the
|
55
|
-
server during each deploy.
|
54
|
+
This generates default deploy callback scripts in the `bin/deploy/remote/` directory - edit the callback scripts according to your needs (cp. below)
|
56
55
|
|
57
56
|
4. Push the code.
|
58
57
|
|
@@ -60,10 +59,6 @@ Initial setup
|
|
60
59
|
git push production master
|
61
60
|
```
|
62
61
|
|
63
|
-
3. Login to your server and manually perform necessary one-time administrative operations. This might include:
|
64
|
-
* set up the Apache/nginx virtual host for this application;
|
65
|
-
* check your `config/database.yml` and create the production database.
|
66
|
-
|
67
62
|
|
68
63
|
Everyday deployments
|
69
64
|
--------------------
|
@@ -82,15 +77,12 @@ install the "bricks-deploy" gem.
|
|
82
77
|
On every deploy, the default `deploy/after_push` script performs the following:
|
83
78
|
|
84
79
|
1. updates git submodules (if there are any);
|
85
|
-
2. runs `bundle install --deployment` if there is a Gemfile;
|
86
|
-
3. runs `rake db:migrate` if new migrations have been added;
|
87
|
-
4. clears cached CSS/JS assets in "public/stylesheets" and "public/javascripts";
|
88
80
|
5. restarts the web application.
|
89
81
|
|
90
|
-
You can customize all this by editing generated scripts in the `
|
82
|
+
You can customize all this by editing generated scripts in the `app/config/remote/`
|
91
83
|
directory of your app.
|
92
84
|
|
93
|
-
Deployments are logged to `
|
85
|
+
Deployments are logged to `var/logs/deploy.log` in your application's directory.
|
94
86
|
|
95
87
|
|
96
88
|
How it works
|
@@ -101,12 +93,12 @@ repository. This is how your code on the server is kept up to date. This script
|
|
101
93
|
checks out the latest version of your project from the current branch and
|
102
94
|
runs the following callback scripts:
|
103
95
|
|
104
|
-
* `deploy/setup` - on first push.
|
105
|
-
* `deploy/after_push` - on subsequent pushes. It in turn executes:
|
96
|
+
* `bin/deploy/remote/setup` - on first push.
|
97
|
+
* `bin/deploy/remote/after_push` - on subsequent pushes. It in turn executes:
|
106
98
|
* `deploy/before_restart`
|
107
99
|
* `deploy/restart`
|
108
100
|
* `deploy/after_restart`
|
109
|
-
* `deploy/rollback` - executed for `git deploy rollback`.
|
101
|
+
* `bin/deploy/remote/rollback` - executed for `git deploy rollback`.
|
110
102
|
|
111
103
|
All of the callbacks are optional. These scripts are ordinary Unix executables.
|
112
104
|
The ones which get generated for you by `git deploy init` are written in shell
|
@@ -130,5 +122,4 @@ Extra commands
|
|
130
122
|
* `git deploy upload <files>` - Copy local files to the remote app
|
131
123
|
|
132
124
|
|
133
|
-
|
134
|
-
[heroku]: http://heroku.com/
|
125
|
+
[Heroku]: http://heroku.com/
|
@@ -19,6 +19,7 @@ class BricksDeploy::Generator < Thor::Group
|
|
19
19
|
copy_hook 'before_restart.sh', 'bin/deploy/remote/before_restart'
|
20
20
|
copy_hook 'after_restart.sh', 'bin/deploy/remote/after_restart'
|
21
21
|
copy_hook 'setup.sh', 'bin/deploy/remote/setup'
|
22
|
+
copy_hook 'rollback.sh', 'bin/deploy/remote/rollback'
|
22
23
|
end
|
23
24
|
|
24
25
|
private
|
@@ -1,3 +1,3 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
echo "Before restart of Bricks app
|
3
|
+
echo "Before restart of Bricks app ..."
|
@@ -1,3 +1,3 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
echo "Setting up Bricks app ...
|
3
|
+
echo "Setting up Bricks app ..."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricks-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Marohnić
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/bricks_deploy/templates/after_restart.sh
|
73
73
|
- lib/bricks_deploy/templates/before_restart.sh
|
74
74
|
- lib/bricks_deploy/templates/restart.sh
|
75
|
+
- lib/bricks_deploy/templates/rollback.sh
|
75
76
|
- lib/bricks_deploy/templates/setup.sh
|
76
77
|
- lib/hooks/post-receive.sh
|
77
78
|
- spec/configuration_spec.rb
|