railsdock 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/Gemfile.lock +1 -1
  4. data/example-app/.browserslistrc +1 -0
  5. data/example-app/.gitignore +31 -0
  6. data/example-app/.ruby-version +1 -0
  7. data/example-app/Gemfile +46 -0
  8. data/example-app/Gemfile.lock +201 -0
  9. data/example-app/README.md +24 -0
  10. data/example-app/Rakefile +6 -0
  11. data/example-app/app/assets/config/manifest.js +2 -0
  12. data/example-app/app/assets/images/.keep +0 -0
  13. data/example-app/app/assets/stylesheets/application.css +15 -0
  14. data/example-app/app/channels/application_cable/channel.rb +4 -0
  15. data/example-app/app/channels/application_cable/connection.rb +4 -0
  16. data/example-app/app/controllers/application_controller.rb +2 -0
  17. data/example-app/app/controllers/concerns/.keep +0 -0
  18. data/example-app/app/helpers/application_helper.rb +2 -0
  19. data/example-app/app/javascript/channels/consumer.js +6 -0
  20. data/example-app/app/javascript/channels/index.js +5 -0
  21. data/example-app/app/javascript/packs/application.js +17 -0
  22. data/example-app/app/jobs/application_job.rb +7 -0
  23. data/example-app/app/mailers/application_mailer.rb +4 -0
  24. data/example-app/app/models/application_record.rb +3 -0
  25. data/example-app/app/models/concerns/.keep +0 -0
  26. data/example-app/app/views/layouts/application.html.erb +15 -0
  27. data/example-app/app/views/layouts/mailer.html.erb +13 -0
  28. data/example-app/app/views/layouts/mailer.text.erb +1 -0
  29. data/example-app/babel.config.js +72 -0
  30. data/example-app/bin/bundle +105 -0
  31. data/example-app/bin/rails +9 -0
  32. data/example-app/bin/rake +9 -0
  33. data/example-app/bin/setup +36 -0
  34. data/example-app/bin/spring +17 -0
  35. data/example-app/bin/webpack +18 -0
  36. data/example-app/bin/webpack-dev-server +18 -0
  37. data/example-app/bin/yarn +11 -0
  38. data/example-app/config/application.rb +35 -0
  39. data/example-app/config/boot.rb +4 -0
  40. data/example-app/config/cable.yml +10 -0
  41. data/example-app/config/credentials.yml.enc +1 -0
  42. data/example-app/config/database.yml +18 -0
  43. data/example-app/config/environment.rb +5 -0
  44. data/example-app/config/environments/development.rb +62 -0
  45. data/example-app/config/environments/production.rb +112 -0
  46. data/example-app/config/environments/test.rb +48 -0
  47. data/example-app/config/initializers/application_controller_renderer.rb +8 -0
  48. data/example-app/config/initializers/assets.rb +14 -0
  49. data/example-app/config/initializers/backtrace_silencers.rb +7 -0
  50. data/example-app/config/initializers/content_security_policy.rb +30 -0
  51. data/example-app/config/initializers/cookies_serializer.rb +5 -0
  52. data/example-app/config/initializers/filter_parameter_logging.rb +4 -0
  53. data/example-app/config/initializers/inflections.rb +16 -0
  54. data/example-app/config/initializers/mime_types.rb +4 -0
  55. data/example-app/config/initializers/wrap_parameters.rb +14 -0
  56. data/example-app/config/locales/en.yml +33 -0
  57. data/example-app/config/puma.rb +38 -0
  58. data/example-app/config/routes.rb +3 -0
  59. data/example-app/config/spring.rb +6 -0
  60. data/example-app/config/storage.yml +34 -0
  61. data/example-app/config/webpack/development.js +5 -0
  62. data/example-app/config/webpack/environment.js +3 -0
  63. data/example-app/config/webpack/production.js +5 -0
  64. data/example-app/config/webpack/test.js +5 -0
  65. data/example-app/config/webpacker.yml +96 -0
  66. data/example-app/config.ru +5 -0
  67. data/example-app/db/schema.rb +18 -0
  68. data/example-app/db/seeds.rb +7 -0
  69. data/example-app/lib/assets/.keep +0 -0
  70. data/example-app/lib/tasks/.keep +0 -0
  71. data/example-app/log/.keep +0 -0
  72. data/example-app/package.json +15 -0
  73. data/example-app/postcss.config.js +12 -0
  74. data/example-app/public/404.html +67 -0
  75. data/example-app/public/422.html +67 -0
  76. data/example-app/public/500.html +66 -0
  77. data/example-app/public/apple-touch-icon-precomposed.png +0 -0
  78. data/example-app/public/apple-touch-icon.png +0 -0
  79. data/example-app/public/favicon.ico +0 -0
  80. data/example-app/public/robots.txt +1 -0
  81. data/example-app/storage/.keep +0 -0
  82. data/example-app/tmp/.keep +0 -0
  83. data/example-app/vendor/.keep +0 -0
  84. data/example-app/yarn.lock +7721 -0
  85. data/lib/railsdock/commands/install.rb +11 -3
  86. data/lib/railsdock/templates/install/default/Dockerfile +10 -4
  87. data/lib/railsdock/templates/install/default/default.env.erb +5 -18
  88. data/lib/railsdock/templates/install/default/docker-compose.yml.erb +8 -18
  89. data/lib/railsdock/templates/install/default/{dev-entrypoint → entrypoint.sh} +4 -4
  90. data/lib/railsdock/templates/install/postgres/docker-compose.yml.erb +2 -0
  91. data/lib/railsdock/templates/install/postgres/postgres.env +0 -3
  92. data/lib/railsdock/version.rb +1 -1
  93. metadata +85 -5
  94. data/lib/railsdock/templates/install/default/docker-compose.mac.yml +0 -7
@@ -0,0 +1,5 @@
1
+ process.env.NODE_ENV = process.env.NODE_ENV || 'development'
2
+
3
+ const environment = require('./environment')
4
+
5
+ module.exports = environment.toWebpackConfig()
@@ -0,0 +1,3 @@
1
+ const { environment } = require('@rails/webpacker')
2
+
3
+ module.exports = environment
@@ -0,0 +1,5 @@
1
+ process.env.NODE_ENV = process.env.NODE_ENV || 'production'
2
+
3
+ const environment = require('./environment')
4
+
5
+ module.exports = environment.toWebpackConfig()
@@ -0,0 +1,5 @@
1
+ process.env.NODE_ENV = process.env.NODE_ENV || 'development'
2
+
3
+ const environment = require('./environment')
4
+
5
+ module.exports = environment.toWebpackConfig()
@@ -0,0 +1,96 @@
1
+ # Note: You must restart bin/webpack-dev-server for changes to take effect
2
+
3
+ default: &default
4
+ source_path: app/javascript
5
+ source_entry_path: packs
6
+ public_root_path: public
7
+ public_output_path: packs
8
+ cache_path: tmp/cache/webpacker
9
+ check_yarn_integrity: false
10
+ webpack_compile_output: true
11
+
12
+ # Additional paths webpack should lookup modules
13
+ # ['app/assets', 'engine/foo/app/assets']
14
+ resolved_paths: []
15
+
16
+ # Reload manifest.json on all requests so we reload latest compiled packs
17
+ cache_manifest: false
18
+
19
+ # Extract and emit a css file
20
+ extract_css: false
21
+
22
+ static_assets_extensions:
23
+ - .jpg
24
+ - .jpeg
25
+ - .png
26
+ - .gif
27
+ - .tiff
28
+ - .ico
29
+ - .svg
30
+ - .eot
31
+ - .otf
32
+ - .ttf
33
+ - .woff
34
+ - .woff2
35
+
36
+ extensions:
37
+ - .mjs
38
+ - .js
39
+ - .sass
40
+ - .scss
41
+ - .css
42
+ - .module.sass
43
+ - .module.scss
44
+ - .module.css
45
+ - .png
46
+ - .svg
47
+ - .gif
48
+ - .jpeg
49
+ - .jpg
50
+
51
+ development:
52
+ <<: *default
53
+ compile: true
54
+
55
+ # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
56
+ check_yarn_integrity: true
57
+
58
+ # Reference: https://webpack.js.org/configuration/dev-server/
59
+ dev_server:
60
+ https: false
61
+ host: localhost
62
+ port: 3035
63
+ public: localhost:3035
64
+ hmr: false
65
+ # Inline should be set to true if using HMR
66
+ inline: true
67
+ overlay: true
68
+ compress: true
69
+ disable_host_check: true
70
+ use_local_ip: false
71
+ quiet: false
72
+ pretty: false
73
+ headers:
74
+ 'Access-Control-Allow-Origin': '*'
75
+ watch_options:
76
+ ignored: '**/node_modules/**'
77
+
78
+
79
+ test:
80
+ <<: *default
81
+ compile: true
82
+
83
+ # Compile test packs to a separate directory
84
+ public_output_path: packs-test
85
+
86
+ production:
87
+ <<: *default
88
+
89
+ # Production depends on precompilation of packs prior to booting for performance.
90
+ compile: false
91
+
92
+ # Extract and emit a css file
93
+ extract_css: true
94
+
95
+ # Cache manifest.json for performance
96
+ cache_manifest: true
@@ -0,0 +1,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -0,0 +1,18 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # This file is the source Rails uses to define your schema when running `rails
6
+ # db:schema:load`. When creating a new database, `rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
10
+ #
11
+ # It's strongly recommended that you check this file into your version control system.
12
+
13
+ ActiveRecord::Schema.define(version: 0) do
14
+
15
+ # These are extensions that must be enabled in order to support this database
16
+ enable_extension "plpgsql"
17
+
18
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
7
+ # Character.create(name: 'Luke', movie: movies.first)
File without changes
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "docker",
3
+ "private": true,
4
+ "dependencies": {
5
+ "@rails/actioncable": "^6.0.0",
6
+ "@rails/activestorage": "^6.0.0",
7
+ "@rails/ujs": "^6.0.0",
8
+ "@rails/webpacker": "^5.1.1",
9
+ "turbolinks": "^5.2.0"
10
+ },
11
+ "version": "0.1.0",
12
+ "devDependencies": {
13
+ "webpack-dev-server": "^3.11.0"
14
+ }
15
+ }
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ plugins: [
3
+ require('postcss-import'),
4
+ require('postcss-flexbugs-fixes'),
5
+ require('postcss-preset-env')({
6
+ autoprefixer: {
7
+ flexbox: 'no-2009'
8
+ },
9
+ stage: 3
10
+ })
11
+ ]
12
+ }
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
File without changes
@@ -0,0 +1 @@
1
+ # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
File without changes
File without changes
File without changes