odania-static-pages 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.travis.yml +5 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +44 -0
  8. data/Rakefile +10 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/cf-templates/s3-http.yml +50 -0
  12. data/cf-templates/s3-logging.yml +21 -0
  13. data/cf-templates/s3-state.yml +21 -0
  14. data/exe/odania-static-pages +5 -0
  15. data/lib/odania_static_pages/cli/deploy_cli.rb +17 -0
  16. data/lib/odania_static_pages/cli/generator_cli.rb +17 -0
  17. data/lib/odania_static_pages/cli.rb +30 -0
  18. data/lib/odania_static_pages/config/docker_compose.rb +24 -0
  19. data/lib/odania_static_pages/config/generator/jekyll.rb +126 -0
  20. data/lib/odania_static_pages/config/rsync.rb +24 -0
  21. data/lib/odania_static_pages/config/s3.rb +41 -0
  22. data/lib/odania_static_pages/config.rb +127 -0
  23. data/lib/odania_static_pages/deploy/docker_compose.rb +148 -0
  24. data/lib/odania_static_pages/deploy/rsync.rb +73 -0
  25. data/lib/odania_static_pages/deploy/s3.rb +165 -0
  26. data/lib/odania_static_pages/generator/jekyll.rb +112 -0
  27. data/lib/odania_static_pages/server/nginx.rb +7 -0
  28. data/lib/odania_static_pages/version.rb +3 -0
  29. data/lib/odania_static_pages.rb +28 -0
  30. data/odania-static-pages.gemspec +33 -0
  31. data/odania-static-pages.iml +15 -0
  32. data/templates/docker-compose/docker-compose.yml.erb +68 -0
  33. data/templates/jekyll/Gemfile.erb +44 -0
  34. data/templates/jekyll/example_config.yml +19 -0
  35. data/templates/nginx/default-live-vhost.conf +13 -0
  36. data/templates/nginx/default-vhost.conf +21 -0
  37. data/templates/nginx/index.html.erb +14 -0
  38. data/templates/nginx/nginx.conf +41 -0
  39. data/templates/nginx/vhost-redirects.conf.erb +14 -0
  40. data/templates/nginx/vhost.conf.erb +22 -0
  41. metadata +196 -0
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="CompassSettings">
4
+ <option name="compassExecutableFilePath" value="$USER_HOME$/.rvm/gems/ruby-2.3.3/gems/compass-1.0.3/bin/compass" />
5
+ </component>
6
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
7
+ <exclude-output />
8
+ <content url="file://$MODULE_DIR$" />
9
+ <orderEntry type="jdk" jdkName="RVM: ruby-2.3.3" jdkType="RUBY_SDK" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.15.4, RVM: ruby-2.3.3) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.3, RVM: ruby-2.3.3) [gem]" level="application" />
13
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, RVM: ruby-2.3.3) [gem]" level="application" />
14
+ </component>
15
+ </module>
@@ -0,0 +1,68 @@
1
+ version: '2'
2
+ services:
3
+ mailcatcher:
4
+ image: odaniait/mailcatcher-docker:latest
5
+ stdin_open: true
6
+ tty: true
7
+ ports:
8
+ - "2525:2525"
9
+ - "1080:1080"
10
+
11
+ nginx:
12
+ image: nginx:stable
13
+ stdin_open: true
14
+ tty: true
15
+ volumes:
16
+ - "<%= nginx_volume_html %>"
17
+ - "<%= nginx_volume_conf_d %>"
18
+ - "<%= nginx_volume_nginx_conf %>"
19
+ ports:
20
+ - "8080:8080/tcp"
21
+
22
+ redis:
23
+ image: redis:alpine
24
+ stdin_open: true
25
+ tty: true
26
+ ports:
27
+ - "6379:6379/tcp"
28
+
29
+ mongo:
30
+ image: mongo:3.4
31
+ stdin_open: true
32
+ tty: true
33
+ ports:
34
+ - "27017:27017/tcp"
35
+
36
+ varnish:
37
+ build: ../docker/varnish
38
+ stdin_open: true
39
+ tty: true
40
+ volumes:
41
+ - "/tmp/octopress-varnish:/etc/varnish"
42
+ depends_on:
43
+ - generator
44
+ ports:
45
+ - "3000:80/tcp"
46
+
47
+ generator:
48
+ build: ../docker/varnish-generator
49
+ stdin_open: true
50
+ tty: true
51
+ environment:
52
+ OUT_DIR: "/etc/varnish"
53
+ ENVIRONMENT: develop
54
+ volumes:
55
+ - "/tmp/octopress-varnish:/etc/varnish"
56
+
57
+ <% compose_images.each do |image| %>
58
+ <%= image['name'] %>:
59
+ <%= image['build'].nil? ? '' : "build: #{image['build']}" %>
60
+ <%= image['image'].nil? ? '' : "image: #{image['image']}" %>
61
+ stdin_open: true
62
+ tty: true
63
+ environment:
64
+ <% image['environment'].each do |key, val| %>
65
+ <%= key %>: <%= val %>
66
+ <% end %>
67
+
68
+ <% end %>
@@ -0,0 +1,44 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Hello! This is where you manage which Jekyll version is used to run.
4
+ # When you want to use a different version, change it below, save the
5
+ # file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
6
+ #
7
+ # bundle exec jekyll serve
8
+ #
9
+ # This will help ensure the proper Jekyll version is running.
10
+ # Happy Jekylling!
11
+ gem 'jekyll', '~> 3.6.2'
12
+ gem 'octopress', '>= 3'
13
+
14
+ # This is the default theme for new Jekyll sites. You may change this to anything you like.
15
+ gem 'minima', '~> 2.0'
16
+
17
+ gem 'uglifier'
18
+
19
+ # If you want to use GitHub Pages, remove the "gem "jekyll"" above and
20
+ # uncomment the line below. To upgrade, run `bundle update github-pages`.
21
+ # gem "github-pages", group: :jekyll_plugins
22
+
23
+ # If you have any plugins, put them here!
24
+ group :jekyll_plugins do
25
+ gem 'jekyll-feed', '~> 0.6'
26
+ gem 'jekyll-livereload'
27
+ gem 'jekyll-assets'
28
+ gem 'jekyll-seo-tag'
29
+ gem 'jekyll-tagging'
30
+ gem 'jekyll-categories'
31
+
32
+ gem 'octopress-image-tag'
33
+ gem 'octopress-gist'
34
+ end
35
+
36
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
37
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
38
+
39
+ # See https://github.com/rails/execjs#readme for more supported runtimes
40
+ gem 'libv8', platforms: :ruby
41
+ gem 'therubyracer', '>= 0.11.4', platforms: :ruby, require: 'v8'
42
+ gem 'therubyrhino', '>= 0.11.4', platforms: :jruby
43
+
44
+ <%= gem_extra %>
@@ -0,0 +1,19 @@
1
+ pages:
2
+ - name: Example
3
+ url: "https://www.example.com"
4
+ email: info@example.com
5
+ description: >-
6
+ Welcome to the example page!
7
+ baseurl: "/"
8
+ theme: minima
9
+ permalink: /:year/:month/:day/:title/
10
+ lang: en
11
+
12
+ redirect_domains:
13
+ www.example.com:
14
+ - example2.com
15
+
16
+ redirects:
17
+ www.example.com
18
+ - test.example3.com
19
+ - test.example7.com
@@ -0,0 +1,13 @@
1
+ server {
2
+ listen 8080 default_server;
3
+ listen [::]:8080 default_server;
4
+ server_name _;
5
+
6
+ location = /_health {
7
+ return 200 'ok';
8
+ }
9
+
10
+ location / {
11
+ return 301 https://www.die-information.eu;
12
+ }
13
+ }
@@ -0,0 +1,21 @@
1
+ server {
2
+ listen 8080 default_server;
3
+ listen [::]:8080 default_server;
4
+ server_name _;
5
+
6
+ location = /_health {
7
+ return 200 'ok';
8
+ }
9
+
10
+ location / {
11
+ root /srv;
12
+ index index.html index.htm;
13
+ }
14
+
15
+ # redirect server error pages to the static page /50x.html
16
+ #
17
+ error_page 500 502 503 504 /50x.html;
18
+ location = /50x.html {
19
+ root /usr/share/nginx/html;
20
+ }
21
+ }
@@ -0,0 +1,14 @@
1
+ <html>
2
+ <body>
3
+ <h2>Sites</h2>
4
+
5
+ <ul>
6
+ <% sites.each do |site_name, site_path| %>
7
+ <li>
8
+ <a href="<%= site_path.gsub(':8080', ':3000') %>" target="_blank"><%= site_name %></a>
9
+ (<a href="<%= site_path %>" target="_blank">Nginx</a>)
10
+ </li>
11
+ <% end %>
12
+ </ul>
13
+ </body>
14
+ </html>
@@ -0,0 +1,41 @@
1
+ user nginx;
2
+ worker_processes 1;
3
+
4
+ error_log /dev/stdout warn;
5
+ pid /var/run/nginx.pid;
6
+
7
+ events {
8
+ worker_connections 2048;
9
+ }
10
+
11
+ http {
12
+ include /etc/nginx/mime.types;
13
+ default_type application/octet-stream;
14
+
15
+ log_format combined_with_host '$host:$server_port $remote_addr - $remote_user [$time_local] '
16
+ '"$request" $status $body_bytes_sent '
17
+ '"$http_referer" "$http_user_agent"';
18
+
19
+ access_log /dev/stdout combined_with_host;
20
+
21
+ sendfile on;
22
+ tcp_nopush on;
23
+ tcp_nodelay on;
24
+ keepalive_timeout 65;
25
+ types_hash_max_size 2048;
26
+
27
+ server_names_hash_bucket_size 64;
28
+
29
+ gzip on;
30
+ gzip_disable "msie6";
31
+
32
+ map $http_accept_language $lang {
33
+ default en;
34
+ ~*de de;
35
+ ~*en en;
36
+ }
37
+
38
+ index index.html index.htm;
39
+
40
+ include /etc/nginx/conf.d/*.conf;
41
+ }
@@ -0,0 +1,14 @@
1
+ <% redirects.each_pair do |to_host, server_name| %>
2
+ server {
3
+ listen 8080;
4
+ listen [::]:8080;
5
+
6
+ root <%= image_nginx_html_dir %>;
7
+ index index.html index.htm index.nginx-debian.html;
8
+
9
+ server_name <%= server_name.join(' ') %>;
10
+
11
+ return 301 $scheme://<%= to_host %>$request_uri;
12
+ }
13
+
14
+ <% end %>
@@ -0,0 +1,22 @@
1
+ server {
2
+ listen 8080;
3
+ listen [::]:8080;
4
+
5
+ root <%= File.join '/srv', page_config.first[:relative_path] %>;
6
+ index index.html index.htm;
7
+
8
+ server_name <%= full_site_name %>;
9
+
10
+ error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 /404/index.html;
11
+
12
+ <% if page_config.count > 1 %>
13
+ location = / {
14
+ return 301 $scheme://$http_host/$lang/;
15
+ }
16
+
17
+ <% end %>
18
+ location / {
19
+ expires <%= expires %>;
20
+ try_files $uri $uri/ $uri.html =404;
21
+ }
22
+ }
metadata ADDED
@@ -0,0 +1,196 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: odania-static-pages
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Mike Petersen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-11-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
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: autostacker24
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.8.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.8.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: aws-sdk
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mimemagic
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
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: thor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.15'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.15'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '10.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '10.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: minitest
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '5.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '5.0'
125
+ description: Helper for creating static pages
126
+ email:
127
+ - mike@odania-it.de
128
+ executables:
129
+ - odania-static-pages
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - ".gitignore"
134
+ - ".travis.yml"
135
+ - CODE_OF_CONDUCT.md
136
+ - Gemfile
137
+ - LICENSE.txt
138
+ - README.md
139
+ - Rakefile
140
+ - bin/console
141
+ - bin/setup
142
+ - cf-templates/s3-http.yml
143
+ - cf-templates/s3-logging.yml
144
+ - cf-templates/s3-state.yml
145
+ - exe/odania-static-pages
146
+ - lib/odania_static_pages.rb
147
+ - lib/odania_static_pages/cli.rb
148
+ - lib/odania_static_pages/cli/deploy_cli.rb
149
+ - lib/odania_static_pages/cli/generator_cli.rb
150
+ - lib/odania_static_pages/config.rb
151
+ - lib/odania_static_pages/config/docker_compose.rb
152
+ - lib/odania_static_pages/config/generator/jekyll.rb
153
+ - lib/odania_static_pages/config/rsync.rb
154
+ - lib/odania_static_pages/config/s3.rb
155
+ - lib/odania_static_pages/deploy/docker_compose.rb
156
+ - lib/odania_static_pages/deploy/rsync.rb
157
+ - lib/odania_static_pages/deploy/s3.rb
158
+ - lib/odania_static_pages/generator/jekyll.rb
159
+ - lib/odania_static_pages/server/nginx.rb
160
+ - lib/odania_static_pages/version.rb
161
+ - odania-static-pages.gemspec
162
+ - odania-static-pages.iml
163
+ - templates/docker-compose/docker-compose.yml.erb
164
+ - templates/jekyll/Gemfile.erb
165
+ - templates/jekyll/example_config.yml
166
+ - templates/nginx/default-live-vhost.conf
167
+ - templates/nginx/default-vhost.conf
168
+ - templates/nginx/index.html.erb
169
+ - templates/nginx/nginx.conf
170
+ - templates/nginx/vhost-redirects.conf.erb
171
+ - templates/nginx/vhost.conf.erb
172
+ homepage: http://www.odania.com
173
+ licenses:
174
+ - MIT
175
+ metadata: {}
176
+ post_install_message:
177
+ rdoc_options: []
178
+ require_paths:
179
+ - lib
180
+ required_ruby_version: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ required_rubygems_version: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ requirements: []
191
+ rubyforge_project:
192
+ rubygems_version: 2.6.10
193
+ signing_key:
194
+ specification_version: 4
195
+ summary: Helper For creating static pages
196
+ test_files: []