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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 654d1f6e350eddc5c93e13e1702444d7a78476cf
4
- data.tar.gz: 51580fd5b57c63e79e4efa305b9545e217e87bcf
3
+ metadata.gz: 6539efaf951659ad0d35a39b582b747495856de3
4
+ data.tar.gz: bbfb4cae46807ccfd50d7fe453fb8722858d8c71
5
5
  SHA512:
6
- metadata.gz: 9808228b03bc748ed043c5846bc781ed89f8128050cbfd787821a9bc8ad1fd34de7c97aa2452c939474cd1bce1d3dc1e57d0e4e441d6a66fc6b738de1613e232
7
- data.tar.gz: d3bc89ec446bc88a2182b2b9a0d6eec6ed7c9e47baf36b63a540c704ebcc789257122f5c35c4c5c80081ebe7c1cf540e31d423a845753f9550f51282ef5c38e9
6
+ metadata.gz: d75df9b1a429328a6ed90969147533dd1982c540a69d78000c57de8325106feda787d2146c62814c74b041424c36b18288203ba23f1c80ee6e6399cf62fcb70c
7
+ data.tar.gz: 0239524cf87f464699e7166682e8d6fe79dd3f8b627c935f35b0b38162da6adaf7a711018f450eec3b7c97015703a81327cf5aa5a52d102cee6798d025d34cca
data/README.md CHANGED
@@ -1,8 +1,14 @@
1
1
  # DockerHouston
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/docker_houston`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ DockerHouston is a utiilty for deploying rails app into a docker environments.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
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
- ## Usage
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
- TODO: Write usage instructions here
63
+ ##Custom Command Cap Command
26
64
 
27
- ## Development
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
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module DockerHouston
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  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.2
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-04-11 00:00:00.000000000 Z
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