docker_houston 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +79 -7
- data/docker_houston.gemspec +0 -1
- data/lib/docker_houston/version.rb +1 -1
- data/lib/generators/docker_houston/install_generator.rb +4 -0
- metadata +2 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6539efaf951659ad0d35a39b582b747495856de3
|
|
4
|
+
data.tar.gz: bbfb4cae46807ccfd50d7fe453fb8722858d8c71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d75df9b1a429328a6ed90969147533dd1982c540a69d78000c57de8325106feda787d2146c62814c74b041424c36b18288203ba23f1c80ee6e6399cf62fcb70c
|
|
7
|
+
data.tar.gz: 0239524cf87f464699e7166682e8d6fe79dd3f8b627c935f35b0b38162da6adaf7a711018f450eec3b7c97015703a81327cf5aa5a52d102cee6798d025d34cca
|
data/README.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
# DockerHouston
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DockerHouston is a utiilty for deploying rails app into a docker environments.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It builds on the top of Capistrano for differnt deployment to a docker host.
|
|
6
|
+
|
|
7
|
+
docker_houston comes with a generator to copy and templates all necessary config files and to the target rails project.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
###Prerequisite
|
|
11
|
+
Make sure you have access to the ``docker_host`` with the user as ``deploy``.
|
|
6
12
|
|
|
7
13
|
## Installation
|
|
8
14
|
|
|
@@ -20,15 +26,81 @@ Or install it yourself as:
|
|
|
20
26
|
|
|
21
27
|
$ gem install docker_houston
|
|
22
28
|
|
|
23
|
-
##
|
|
29
|
+
## Getting Started
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Prerequisite
|
|
33
|
+
|
|
34
|
+
Add `unicorn` to gemfile and ensure the `therubyracer` is enabled.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
gem 'therubyracer', platforms: :ruby
|
|
38
|
+
|
|
39
|
+
gem 'unicorn'
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Install
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
rails g docker_houston:install APP_NAME APP_DOMAIN DOCKER_HOST
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
APP_NAME: the app name for your project.
|
|
50
|
+
|
|
51
|
+
APP_DOMAIN: the virtual url for the app.
|
|
52
|
+
|
|
53
|
+
DOCKER_HOST: the remote host for docker instance.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
###Make `bin/docker` executable
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
chmod +x bin/docker
|
|
60
|
+
|
|
61
|
+
```
|
|
24
62
|
|
|
25
|
-
|
|
63
|
+
##Custom Command Cap Command
|
|
26
64
|
|
|
27
|
-
|
|
65
|
+
```ruby
|
|
66
|
+
cap -T
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Check all the docker command that is avaiable to you.
|
|
28
70
|
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
71
|
|
|
31
|
-
|
|
72
|
+
### Deployment
|
|
73
|
+
|
|
74
|
+
```ruby
|
|
75
|
+
cap staging docker:lift_off
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This will we do the following:
|
|
80
|
+
|
|
81
|
+
```ruby
|
|
82
|
+
invoke 'deploy'
|
|
83
|
+
invoke 'docker:setup_db'
|
|
84
|
+
invoke 'docker:build_container'
|
|
85
|
+
invoke 'docker:stop'
|
|
86
|
+
invoke 'docker:start'
|
|
87
|
+
invoke 'docker:notify'
|
|
88
|
+
```
|
|
89
|
+
* Deploy a new version to the current folder.
|
|
90
|
+
* Build the container for it.
|
|
91
|
+
* Stop the current running containers if existed.
|
|
92
|
+
* Start new container for the project.
|
|
93
|
+
* Notifying to Team channel (TODO://)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Console
|
|
97
|
+
You can also run console command insdie the rails app within the docker container.
|
|
98
|
+
|
|
99
|
+
```ruby
|
|
100
|
+
cap staging docker:console
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
|
|
32
104
|
|
|
33
105
|
## Contributing
|
|
34
106
|
|
data/docker_houston.gemspec
CHANGED
|
@@ -26,6 +26,5 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.require_paths = ["lib","bin","tasks"]
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 1.10"
|
|
28
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
29
|
-
spec.add_dependency "rails"
|
|
30
29
|
spec.add_dependency 'capistrano', '~> 3.1'
|
|
31
30
|
end
|
|
@@ -24,6 +24,10 @@ module DockerHouston
|
|
|
24
24
|
copy_file "secrets.yml", "config/secrets.yml"
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
def copy_database_file
|
|
28
|
+
copy_file "database.yml.docker.erb", "config/database.yml.docker"
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
def copy_unicorn
|
|
28
32
|
copy_file "unicorn.rb", "config/unicorn.rb"
|
|
29
33
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: docker_houston
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- alex-zige
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -38,20 +38,6 @@ dependencies:
|
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '10.0'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: rails
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0'
|
|
48
|
-
type: :runtime
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - ">="
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
42
|
name: capistrano
|
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|