docker-stack 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +4 -0
  4. data/.rubocop.yml +25 -0
  5. data/.rubocop_todo.yml +23 -0
  6. data/.travis.yml +12 -0
  7. data/Gemfile +44 -0
  8. data/LICENSE.txt +13 -0
  9. data/README.md +117 -0
  10. data/Rakefile +12 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docker-stack.gemspec +36 -0
  14. data/lib/docker/stack.rb +8 -0
  15. data/lib/docker/stack/container.rb +45 -0
  16. data/lib/docker/stack/controller.rb +115 -0
  17. data/lib/docker/stack/rake_task.rb +63 -0
  18. data/lib/docker/stack/version.rb +5 -0
  19. data/lib/generators/docker/stack/install_generator.rb +48 -0
  20. data/lib/generators/docker/stack/service.rb +49 -0
  21. data/lib/generators/docker/stack/service/fedora_generator.rb +20 -0
  22. data/lib/generators/docker/stack/service/postgres_generator.rb +22 -0
  23. data/lib/generators/docker/stack/service/redis_generator.rb +20 -0
  24. data/lib/generators/docker/stack/service/solr_generator.rb +22 -0
  25. data/lib/generators/docker/stack/templates/config/database.yml +23 -0
  26. data/lib/generators/docker/stack/templates/config/fedora.yml +15 -0
  27. data/lib/generators/docker/stack/templates/config/redis.yml +9 -0
  28. data/lib/generators/docker/stack/templates/config/solr.yml +7 -0
  29. data/lib/generators/docker/stack/templates/docker.rake +25 -0
  30. data/lib/generators/docker/stack/templates/services/fedora.yml.erb +9 -0
  31. data/lib/generators/docker/stack/templates/services/postgres.yml.erb +13 -0
  32. data/lib/generators/docker/stack/templates/services/redis.yml.erb +10 -0
  33. data/lib/generators/docker/stack/templates/services/solr.yml.erb +20 -0
  34. data/lib/generators/docker/stack/templates/solr/conf/_rest_managed.json +3 -0
  35. data/lib/generators/docker/stack/templates/solr/conf/admin-extra.html +31 -0
  36. data/lib/generators/docker/stack/templates/solr/conf/elevate.xml +36 -0
  37. data/lib/generators/docker/stack/templates/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  38. data/lib/generators/docker/stack/templates/solr/conf/protwords.txt +21 -0
  39. data/lib/generators/docker/stack/templates/solr/conf/schema.xml +366 -0
  40. data/lib/generators/docker/stack/templates/solr/conf/scripts.conf +24 -0
  41. data/lib/generators/docker/stack/templates/solr/conf/solrconfig.xml +322 -0
  42. data/lib/generators/docker/stack/templates/solr/conf/spellings.txt +2 -0
  43. data/lib/generators/docker/stack/templates/solr/conf/stopwords.txt +58 -0
  44. data/lib/generators/docker/stack/templates/solr/conf/stopwords_en.txt +58 -0
  45. data/lib/generators/docker/stack/templates/solr/conf/synonyms.txt +31 -0
  46. data/lib/generators/docker/stack/templates/solr/conf/xslt/example.xsl +132 -0
  47. data/lib/generators/docker/stack/templates/solr/conf/xslt/example_atom.xsl +67 -0
  48. data/lib/generators/docker/stack/templates/solr/conf/xslt/example_rss.xsl +66 -0
  49. data/lib/generators/docker/stack/templates/solr/conf/xslt/luke.xsl +337 -0
  50. data/lib/generators/docker/stack/util.rb +38 -0
  51. metadata +261 -0
@@ -0,0 +1,38 @@
1
+ module Docker
2
+ module Stack
3
+ module Util
4
+ COMPOSE_FILE_VERSION = '3.4'.freeze
5
+
6
+ def self.included(base)
7
+ base.source_root File.expand_path('templates', __dir__)
8
+
9
+ base.no_tasks do
10
+ def compose_file_path(env = @env)
11
+ ".docker-stack/#{project}-#{env}/docker-compose.yml"
12
+ end
13
+
14
+ def compose_file_full_path
15
+ File.join(destination_root, compose_file_path)
16
+ end
17
+
18
+ def current_service_config
19
+ create_file compose_file_path, empty_service_config.to_yaml unless File.exist?(compose_file_full_path)
20
+ YAML.safe_load(File.read(compose_file_full_path))
21
+ end
22
+
23
+ def empty_service_config
24
+ {
25
+ 'version' => COMPOSE_FILE_VERSION,
26
+ 'volumes' => {},
27
+ 'services' => {}
28
+ }
29
+ end
30
+
31
+ def project
32
+ @project ||= Controller.default_project_name
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,261 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: docker-stack
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Michael Klein
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-03-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: docker-api
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: docker-compose
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '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: '5.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bixby
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.16'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.16'
83
+ - !ruby/object:Gem::Dependency
84
+ name: byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: engine_cart
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: mocha
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry-byebug
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '12.0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '12.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '3.0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '3.0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ description: Support code and rake tasks for running Rails on top of Dockerized services.
182
+ email:
183
+ - mbklein@gmail.com
184
+ executables: []
185
+ extensions: []
186
+ extra_rdoc_files: []
187
+ files:
188
+ - ".gitignore"
189
+ - ".rspec"
190
+ - ".rubocop.yml"
191
+ - ".rubocop_todo.yml"
192
+ - ".travis.yml"
193
+ - Gemfile
194
+ - LICENSE.txt
195
+ - README.md
196
+ - Rakefile
197
+ - bin/console
198
+ - bin/setup
199
+ - docker-stack.gemspec
200
+ - lib/docker/stack.rb
201
+ - lib/docker/stack/container.rb
202
+ - lib/docker/stack/controller.rb
203
+ - lib/docker/stack/rake_task.rb
204
+ - lib/docker/stack/version.rb
205
+ - lib/generators/docker/stack/install_generator.rb
206
+ - lib/generators/docker/stack/service.rb
207
+ - lib/generators/docker/stack/service/fedora_generator.rb
208
+ - lib/generators/docker/stack/service/postgres_generator.rb
209
+ - lib/generators/docker/stack/service/redis_generator.rb
210
+ - lib/generators/docker/stack/service/solr_generator.rb
211
+ - lib/generators/docker/stack/templates/config/database.yml
212
+ - lib/generators/docker/stack/templates/config/fedora.yml
213
+ - lib/generators/docker/stack/templates/config/redis.yml
214
+ - lib/generators/docker/stack/templates/config/solr.yml
215
+ - lib/generators/docker/stack/templates/docker.rake
216
+ - lib/generators/docker/stack/templates/services/fedora.yml.erb
217
+ - lib/generators/docker/stack/templates/services/postgres.yml.erb
218
+ - lib/generators/docker/stack/templates/services/redis.yml.erb
219
+ - lib/generators/docker/stack/templates/services/solr.yml.erb
220
+ - lib/generators/docker/stack/templates/solr/conf/_rest_managed.json
221
+ - lib/generators/docker/stack/templates/solr/conf/admin-extra.html
222
+ - lib/generators/docker/stack/templates/solr/conf/elevate.xml
223
+ - lib/generators/docker/stack/templates/solr/conf/mapping-ISOLatin1Accent.txt
224
+ - lib/generators/docker/stack/templates/solr/conf/protwords.txt
225
+ - lib/generators/docker/stack/templates/solr/conf/schema.xml
226
+ - lib/generators/docker/stack/templates/solr/conf/scripts.conf
227
+ - lib/generators/docker/stack/templates/solr/conf/solrconfig.xml
228
+ - lib/generators/docker/stack/templates/solr/conf/spellings.txt
229
+ - lib/generators/docker/stack/templates/solr/conf/stopwords.txt
230
+ - lib/generators/docker/stack/templates/solr/conf/stopwords_en.txt
231
+ - lib/generators/docker/stack/templates/solr/conf/synonyms.txt
232
+ - lib/generators/docker/stack/templates/solr/conf/xslt/example.xsl
233
+ - lib/generators/docker/stack/templates/solr/conf/xslt/example_atom.xsl
234
+ - lib/generators/docker/stack/templates/solr/conf/xslt/example_rss.xsl
235
+ - lib/generators/docker/stack/templates/solr/conf/xslt/luke.xsl
236
+ - lib/generators/docker/stack/util.rb
237
+ homepage: https://github.com/mbklein/docker-stack
238
+ licenses:
239
+ - Apache2
240
+ metadata: {}
241
+ post_install_message:
242
+ rdoc_options: []
243
+ require_paths:
244
+ - lib
245
+ required_ruby_version: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ required_rubygems_version: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ version: '0'
255
+ requirements: []
256
+ rubyforge_project:
257
+ rubygems_version: 2.7.3
258
+ signing_key:
259
+ specification_version: 4
260
+ summary: Support code and rake tasks for running Rails on top of Dockerized services.
261
+ test_files: []