dockerize_rails 1.1.0.beta.3 → 1.2.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -1
  3. data/{.travis.yml → .travis.example.yml} +0 -0
  4. data/README.md +51 -0
  5. data/docs/DockerizeRails/CommandLine.html +179 -0
  6. data/docs/DockerizeRails.html +127 -0
  7. data/docs/DockerizeRailsCLI.html +137 -0
  8. data/docs/_index.html +127 -0
  9. data/docs/class_list.html +51 -0
  10. data/docs/css/common.css +1 -0
  11. data/docs/css/full_list.css +58 -0
  12. data/docs/css/style.css +492 -0
  13. data/docs/file.README.html +185 -0
  14. data/docs/file_list.html +56 -0
  15. data/docs/frames.html +17 -0
  16. data/docs/index.html +185 -0
  17. data/docs/js/app.js +248 -0
  18. data/docs/js/full_list.js +216 -0
  19. data/docs/js/jquery.js +4 -0
  20. data/docs/method_list.html +59 -0
  21. data/docs/top-level-namespace.html +112 -0
  22. data/lib/dockerize_rails/command_line_methods.rb +27 -14
  23. data/lib/dockerize_rails/config_generator.rb +3 -3
  24. data/lib/dockerize_rails/constants.rb +22 -7
  25. data/lib/dockerize_rails/docker_commands/docker_build.rb +21 -6
  26. data/lib/dockerize_rails/docker_commands/docker_delete.rb +37 -0
  27. data/lib/dockerize_rails/docker_commands/docker_helpers.rb +81 -0
  28. data/lib/dockerize_rails/docker_commands/docker_options.rb +58 -0
  29. data/lib/dockerize_rails/docker_commands/docker_start.rb +106 -0
  30. data/lib/dockerize_rails/docker_commands/docker_stop.rb +43 -0
  31. data/lib/dockerize_rails/docker_commands.rb +39 -2
  32. data/lib/dockerize_rails/dr_config.rb +1 -1
  33. data/lib/dockerize_rails/helpers.rb +2 -1
  34. data/lib/dockerize_rails/version.rb +1 -1
  35. data/lib/dockerize_rails.rb +11 -0
  36. data/resources/.dockerignore.erb +1 -1
  37. metadata +25 -3
@@ -0,0 +1,185 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ File: README
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "README";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="file_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+ <span class="title">File: README</span>
41
+
42
+ </div>
43
+
44
+ <div id="search">
45
+
46
+ <a class="full_list_link" id="class_list_link"
47
+ href="class_list.html">
48
+
49
+ <svg width="24" height="24">
50
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
+ </svg>
54
+ </a>
55
+
56
+ </div>
57
+ <div class="clear"></div>
58
+ </div>
59
+
60
+ <div id="content"><div id='filecontents'>
61
+ <h1 id="label-DockerizeRails">DockerizeRails</h1>
62
+
63
+ <p><a href="https://github.com/eendroroy/dockerize_rails"><img
64
+ src="https://img.shields.io/github/tag/eendroroy/dockerize_rails.svg"></a>
65
+ <a href="https://rubygems.org/gems/dockerize_rails"><img
66
+ src="https://badge.fury.io/rb/dockerize_rails.svg"></a> <a
67
+ href="https://rubygems.org/gems/dockerize_rails"><img
68
+ src="https://img.shields.io/gem/dt/dockerize_rails.svg"></a> <a
69
+ href="https://travis-ci.org/eendroroy/dockerize_rails"><img
70
+ src="https://travis-ci.org/eendroroy/dockerize_rails.svg?branch=master"></a>
71
+ <a href="https://codeclimate.com/github/eendroroy/dockerize_rails"><img
72
+ src="https://codeclimate.com/github/eendroroy/dockerize_rails/badges/gpa.svg"></a>
73
+ <a href="CONTRIBUTORS.md"><img
74
+ src="https://img.shields.io/github/contributors/eendroroy/dockerize_rails.svg"></a></p>
75
+
76
+ <h2 id="label-Installation">Installation</h2>
77
+
78
+ <p>Add this line to your rails application&#39;s Gemfile:</p>
79
+
80
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dockerize_rails</span><span class='tstring_end'>&#39;</span></span>
81
+ </code></pre>
82
+
83
+ <p>And then execute: <code>bash $ bundle </code></p>
84
+
85
+ <h2 id="label-Usage">Usage</h2>
86
+
87
+ <p>First create the configuration file <code>.dockerize.yml</code> for the gem
88
+ itself. Run: <code>bundle exec dock configure</code> to generate the
89
+ template. Use <code>--tiny</code> option to skip the description of
90
+ configuration fields: <code>bundle exec dock configure --tiny</code>.</p>
91
+
92
+ <p>To create the docker config files (Dockerfile, provisions,
93
+ docker-compose.yml etc.) run: <code>bundle exec dock dockerize</code>. To
94
+ create docker environment for running tests use <code>--test-env</code>
95
+ option: <code>bundle exec dock dockerize --test-env</code>.</p>
96
+
97
+ <p>Use <code>docker-compose</code> to run application in docker:
98
+ <code>docker-compose build &amp;&amp; docker-compose up -d</code>.</p>
99
+
100
+ <p>If you see <strong>migration error</strong> in browser run the following
101
+ commands:</p>
102
+
103
+ <pre class="code ruby"><code class="ruby">$ docker-compose down # stop and destroy all running containers
104
+ $ docker-compose up -d mysql # if application uses postgresql database use &#39;postgresql&#39; instead of &#39;mysql&#39;
105
+ $ sleep 30 # wait 30 seconds to let the database container start properly
106
+ $ docker-compose up -d rails # now start the rails container</code></pre>
107
+
108
+ <p>To remove docker configurations: <code>bundle exec dock undockerize</code>.
109
+ Use <code>--purge</code> option to remove <code>.dockerize.yml</code> file:
110
+ <code>bundle exec dock undockerize --purge</code></p>
111
+
112
+ <p>All available commands: <code>bash $ bundle exec dock help $ bundle exec
113
+ dock configure $ bundle exec dock configure --tiny $ bundle exec dock
114
+ dockerize $ bundle exec dock dockerize --test-env $ bundle exec dock
115
+ undockerize $ bundle exec dock undockerize --purge $ bundle exec dock
116
+ docker_info $ bundle exec dock docker_pull $ bundle exec dock docker_build
117
+ $ bundle exec dock docker_start $ bundle exec dock docker_stop $ bundle
118
+ exec dock docker_stop --delete </code></p>
119
+
120
+ <p>Help message: “` Usage: dock &lt;command&gt; or: bundle exec dock
121
+ &lt;command&gt;</p>
122
+
123
+ <p>commands:</p>
124
+
125
+ <pre class="code ruby"><code class="ruby"> configure, c, rc, cr - Generates &#39;.dockerize.yml&#39;
126
+ [--tiny] -- generates shorter config file, skipping all descriptions
127
+
128
+ dockerize, dc, d - Generates docker config files
129
+ [--test-env] -- generates configurations to run tests.
130
+
131
+ undockerize, ud, du, u, dd - Removes docker configurations
132
+ [--purge] -- also removes .dockerize.yml
133
+
134
+ docker_info, info - Shows Docker information
135
+ docker_pull, pull - Pulls base Docker images (ruby, mysql/postgres)
136
+ docker_build, build - Builds Docker images
137
+ docker_start, start - Run/Starts Docker containers
138
+ docker_stop, stop - Stops Docker containers
139
+ [--delete] -- also deletes the containers
140
+
141
+ docker_delete, delete - Deletes Docker containers
142
+ help, h - Prints this message</code></pre>
143
+
144
+ <p>“`</p>
145
+
146
+ <h2 id="label-Demo">Demo</h2>
147
+
148
+ <p><a href="https://asciinema.org/a/121552"><img
149
+ src="https://asciinema.org/a/121552.png"></a></p>
150
+
151
+ <h2 id="label-Development">Development</h2>
152
+
153
+ <p>After checking out the repo, run <code>bin/setup</code> to install
154
+ dependencies. Then, run <code>rake spec</code> to run the tests. You can
155
+ also run <code>bin/console</code> for an interactive prompt that will allow
156
+ you to experiment.</p>
157
+
158
+ <h2 id="label-Contributing">Contributing</h2>
159
+
160
+ <p>Bug reports and pull requests are welcome on GitHub at <a
161
+ href="https://github.com/eendroroy/dockerize_rails">github.com/eendroroy/dockerize_rails</a>.
162
+ This project is intended to be a safe, welcoming space for collaboration,
163
+ and contributors are expected to adhere to the <a
164
+ href="http://contributor-covenant.org">Contributor Covenant</a> code of
165
+ conduct.</p>
166
+
167
+ <h2 id="label-License">License</h2>
168
+
169
+ <p>The gem is available as open source under the terms of the <a
170
+ href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
171
+
172
+ <p><a
173
+ href="https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feendroroy%2Fdockerize_rails?ref=badge_large"><img
174
+ src="https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feendroroy%2Fdockerize_rails.svg?type=large"></a></p>
175
+ </div></div>
176
+
177
+ <div id="footer">
178
+ Generated on Sat Aug 12 10:20:48 2017 by
179
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
180
+ 0.9.9 (ruby-2.1.0).
181
+ </div>
182
+
183
+ </div>
184
+ </body>
185
+ </html>
@@ -0,0 +1,56 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <meta charset="utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>File List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <div id="content">
23
+ <div class="fixed_header">
24
+ <h1 id="full_list_header">File List</h1>
25
+ <div id="full_list_nav">
26
+
27
+ <span><a target="_self" href="class_list.html">
28
+ Classes
29
+ </a></span>
30
+
31
+ <span><a target="_self" href="method_list.html">
32
+ Methods
33
+ </a></span>
34
+
35
+ <span><a target="_self" href="file_list.html">
36
+ Files
37
+ </a></span>
38
+
39
+ </div>
40
+
41
+ <div id="search">Search: <input type="text" /></div>
42
+ </div>
43
+
44
+ <ul id="full_list" class="file">
45
+
46
+
47
+ <li id="object_README" class="odd">
48
+ <div class="item"><span class="object_link"><a href="index.html" title="README">README</a></span></div>
49
+ </li>
50
+
51
+
52
+
53
+ </ul>
54
+ </div>
55
+ </body>
56
+ </html>
data/docs/frames.html ADDED
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Documentation by YARD 0.9.9</title>
6
+ </head>
7
+ <script type="text/javascript" charset="utf-8">
8
+ var match = unescape(window.location.hash).match(/^#!(.+)/);
9
+ var name = match ? match[1] : 'index.html';
10
+ name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
11
+ window.top.location = name;
12
+ </script>
13
+ <noscript>
14
+ <h1>Oops!</h1>
15
+ <h2>YARD requires JavaScript!</h2>
16
+ </noscript>
17
+ </html>
data/docs/index.html ADDED
@@ -0,0 +1,185 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ File: README
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "README";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+ <span class="title">File: README</span>
41
+
42
+ </div>
43
+
44
+ <div id="search">
45
+
46
+ <a class="full_list_link" id="class_list_link"
47
+ href="class_list.html">
48
+
49
+ <svg width="24" height="24">
50
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
+ </svg>
54
+ </a>
55
+
56
+ </div>
57
+ <div class="clear"></div>
58
+ </div>
59
+
60
+ <div id="content"><div id='filecontents'>
61
+ <h1 id="label-DockerizeRails">DockerizeRails</h1>
62
+
63
+ <p><a href="https://github.com/eendroroy/dockerize_rails"><img
64
+ src="https://img.shields.io/github/tag/eendroroy/dockerize_rails.svg"></a>
65
+ <a href="https://rubygems.org/gems/dockerize_rails"><img
66
+ src="https://badge.fury.io/rb/dockerize_rails.svg"></a> <a
67
+ href="https://rubygems.org/gems/dockerize_rails"><img
68
+ src="https://img.shields.io/gem/dt/dockerize_rails.svg"></a> <a
69
+ href="https://travis-ci.org/eendroroy/dockerize_rails"><img
70
+ src="https://travis-ci.org/eendroroy/dockerize_rails.svg?branch=master"></a>
71
+ <a href="https://codeclimate.com/github/eendroroy/dockerize_rails"><img
72
+ src="https://codeclimate.com/github/eendroroy/dockerize_rails/badges/gpa.svg"></a>
73
+ <a href="CONTRIBUTORS.md"><img
74
+ src="https://img.shields.io/github/contributors/eendroroy/dockerize_rails.svg"></a></p>
75
+
76
+ <h2 id="label-Installation">Installation</h2>
77
+
78
+ <p>Add this line to your rails application&#39;s Gemfile:</p>
79
+
80
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dockerize_rails</span><span class='tstring_end'>&#39;</span></span>
81
+ </code></pre>
82
+
83
+ <p>And then execute: <code>bash $ bundle </code></p>
84
+
85
+ <h2 id="label-Usage">Usage</h2>
86
+
87
+ <p>First create the configuration file <code>.dockerize.yml</code> for the gem
88
+ itself. Run: <code>bundle exec dock configure</code> to generate the
89
+ template. Use <code>--tiny</code> option to skip the description of
90
+ configuration fields: <code>bundle exec dock configure --tiny</code>.</p>
91
+
92
+ <p>To create the docker config files (Dockerfile, provisions,
93
+ docker-compose.yml etc.) run: <code>bundle exec dock dockerize</code>. To
94
+ create docker environment for running tests use <code>--test-env</code>
95
+ option: <code>bundle exec dock dockerize --test-env</code>.</p>
96
+
97
+ <p>Use <code>docker-compose</code> to run application in docker:
98
+ <code>docker-compose build &amp;&amp; docker-compose up -d</code>.</p>
99
+
100
+ <p>If you see <strong>migration error</strong> in browser run the following
101
+ commands:</p>
102
+
103
+ <pre class="code ruby"><code class="ruby">$ docker-compose down # stop and destroy all running containers
104
+ $ docker-compose up -d mysql # if application uses postgresql database use &#39;postgresql&#39; instead of &#39;mysql&#39;
105
+ $ sleep 30 # wait 30 seconds to let the database container start properly
106
+ $ docker-compose up -d rails # now start the rails container</code></pre>
107
+
108
+ <p>To remove docker configurations: <code>bundle exec dock undockerize</code>.
109
+ Use <code>--purge</code> option to remove <code>.dockerize.yml</code> file:
110
+ <code>bundle exec dock undockerize --purge</code></p>
111
+
112
+ <p>All available commands: <code>bash $ bundle exec dock help $ bundle exec
113
+ dock configure $ bundle exec dock configure --tiny $ bundle exec dock
114
+ dockerize $ bundle exec dock dockerize --test-env $ bundle exec dock
115
+ undockerize $ bundle exec dock undockerize --purge $ bundle exec dock
116
+ docker_info $ bundle exec dock docker_pull $ bundle exec dock docker_build
117
+ $ bundle exec dock docker_start $ bundle exec dock docker_stop $ bundle
118
+ exec dock docker_stop --delete </code></p>
119
+
120
+ <p>Help message: “` Usage: dock &lt;command&gt; or: bundle exec dock
121
+ &lt;command&gt;</p>
122
+
123
+ <p>commands:</p>
124
+
125
+ <pre class="code ruby"><code class="ruby"> configure, c, rc, cr - Generates &#39;.dockerize.yml&#39;
126
+ [--tiny] -- generates shorter config file, skipping all descriptions
127
+
128
+ dockerize, dc, d - Generates docker config files
129
+ [--test-env] -- generates configurations to run tests.
130
+
131
+ undockerize, ud, du, u, dd - Removes docker configurations
132
+ [--purge] -- also removes .dockerize.yml
133
+
134
+ docker_info, info - Shows Docker information
135
+ docker_pull, pull - Pulls base Docker images (ruby, mysql/postgres)
136
+ docker_build, build - Builds Docker images
137
+ docker_start, start - Run/Starts Docker containers
138
+ docker_stop, stop - Stops Docker containers
139
+ [--delete] -- also deletes the containers
140
+
141
+ docker_delete, delete - Deletes Docker containers
142
+ help, h - Prints this message</code></pre>
143
+
144
+ <p>“`</p>
145
+
146
+ <h2 id="label-Demo">Demo</h2>
147
+
148
+ <p><a href="https://asciinema.org/a/121552"><img
149
+ src="https://asciinema.org/a/121552.png"></a></p>
150
+
151
+ <h2 id="label-Development">Development</h2>
152
+
153
+ <p>After checking out the repo, run <code>bin/setup</code> to install
154
+ dependencies. Then, run <code>rake spec</code> to run the tests. You can
155
+ also run <code>bin/console</code> for an interactive prompt that will allow
156
+ you to experiment.</p>
157
+
158
+ <h2 id="label-Contributing">Contributing</h2>
159
+
160
+ <p>Bug reports and pull requests are welcome on GitHub at <a
161
+ href="https://github.com/eendroroy/dockerize_rails">github.com/eendroroy/dockerize_rails</a>.
162
+ This project is intended to be a safe, welcoming space for collaboration,
163
+ and contributors are expected to adhere to the <a
164
+ href="http://contributor-covenant.org">Contributor Covenant</a> code of
165
+ conduct.</p>
166
+
167
+ <h2 id="label-License">License</h2>
168
+
169
+ <p>The gem is available as open source under the terms of the <a
170
+ href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
171
+
172
+ <p><a
173
+ href="https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feendroroy%2Fdockerize_rails?ref=badge_large"><img
174
+ src="https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feendroroy%2Fdockerize_rails.svg?type=large"></a></p>
175
+ </div></div>
176
+
177
+ <div id="footer">
178
+ Generated on Sat Aug 12 10:20:48 2017 by
179
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
180
+ 0.9.9 (ruby-2.1.0).
181
+ </div>
182
+
183
+ </div>
184
+ </body>
185
+ </html>