dockerfile-rails 1.6.17 → 1.6.18
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06001664944f094c87433a52a0dcdb69fe820682478861d502923676e26f3c73'
|
4
|
+
data.tar.gz: 4189db8d30eefd52ddf399368f60ea63d940325f143c506304f257b87301b508
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e8f29cdfdfd8b16feb8392e65c57e4d5a6ea60e2b596273f1c2af43cb4cb88ac969b0a25a2702e35c6c29422e5e557046aa30a1f9c12df3b1b8663d747c159
|
7
|
+
data.tar.gz: 417cd9a7715a2769c9060f9f2438f6486a06362c662a9ea3dc254f2d842b5120e0fea78661eab18f2cc00529b2db5a0a18be5a44055d29e84f7cbca57ceeb009
|
@@ -517,12 +517,16 @@ private
|
|
517
517
|
options.passenger? or options["max-idle"]
|
518
518
|
end
|
519
519
|
|
520
|
+
def includes_jobs?
|
521
|
+
!(Dir["app/jobs/*.rb"] - ["app/jobs/application_job.rb"]).empty?
|
522
|
+
end
|
523
|
+
|
520
524
|
def using_sidekiq?
|
521
|
-
@gemfile.include?("sidekiq")
|
525
|
+
@gemfile.include?("sidekiq") and includes_jobs?
|
522
526
|
end
|
523
527
|
|
524
528
|
def using_solidq?
|
525
|
-
@gemfile.include?("solid_queue")
|
529
|
+
@gemfile.include?("solid_queue") and includes_jobs?
|
526
530
|
end
|
527
531
|
|
528
532
|
def parallel?
|
@@ -1252,6 +1256,19 @@ private
|
|
1252
1256
|
more
|
1253
1257
|
end
|
1254
1258
|
|
1259
|
+
def compose_web_volumes
|
1260
|
+
volumes = %w[ log storage ]
|
1261
|
+
|
1262
|
+
if deploy_database == "sqlite3"
|
1263
|
+
database = YAML.load_file("config/database.yml", aliases: true).dig("production", "database")
|
1264
|
+
if database && database =~ /^\w/
|
1265
|
+
volumes << File.dirname(database)
|
1266
|
+
end
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
volumes.uniq.sort
|
1270
|
+
end
|
1271
|
+
|
1255
1272
|
def max_idle
|
1256
1273
|
option = options["max-idle"]
|
1257
1274
|
|
@@ -8,9 +8,9 @@ ARG RUBY_VERSION=<%= RUBY_VERSION %>
|
|
8
8
|
|
9
9
|
<% end -%>
|
10
10
|
<% if options.fullstaq -%>
|
11
|
-
FROM <%= platform %>quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-<%= options.jemalloc ? 'jemalloc-' : 'malloctrim-' %><%= variant %><% unless options.precompile == "defer" %>
|
11
|
+
FROM <%= platform %>quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-<%= options.jemalloc ? 'jemalloc-' : 'malloctrim-' %><%= variant %><% unless options.precompile == "defer" %> AS base<% end %>
|
12
12
|
<% else -%>
|
13
|
-
FROM <%= platform %><%= options.registry %>ruby:$RUBY_VERSION-<%= variant %><% unless options.precompile == "defer" %>
|
13
|
+
FROM <%= platform %><%= options.registry %>ruby:$RUBY_VERSION-<%= variant %><% unless options.precompile == "defer" %> AS base<% end %>
|
14
14
|
<% end -%>
|
15
15
|
|
16
16
|
<% unless options.label.empty? -%>
|
@@ -50,7 +50,7 @@ RUN gem update --system <% if RUBY_VERSION.start_with? '2' %>3.4.22 <% end %>--n
|
|
50
50
|
<% unless options.precompile == "defer" -%>
|
51
51
|
|
52
52
|
# Throw-away build stage<%= parallel? ? 's' : '' %> to reduce size of final image
|
53
|
-
FROM base
|
53
|
+
FROM base AS <%= parallel? ? 'pre' : '' %>build
|
54
54
|
|
55
55
|
<% end -%>
|
56
56
|
# Install packages needed to build gems<%= using_node? ? " and node modules" : "" %>
|
@@ -58,7 +58,7 @@ FROM base as <%= parallel? ? 'pre' : '' %>build
|
|
58
58
|
|
59
59
|
<% if parallel? -%>
|
60
60
|
|
61
|
-
FROM prebuild
|
61
|
+
FROM prebuild AS <% if using_bun? %>bun<% else %>node<% end %>
|
62
62
|
|
63
63
|
<% end -%>
|
64
64
|
<% if using_bun? and (!using_execjs? || File.exist?('bun.lockb')) -%>
|
@@ -72,7 +72,7 @@ FROM prebuild as <% if using_bun? %>bun<% else %>node<% end %>
|
|
72
72
|
<%= render partial: 'npm_install', locals: {sources: Dir[*%w(package.json yarn.lock bun.lockb)]} %>
|
73
73
|
|
74
74
|
|
75
|
-
FROM prebuild
|
75
|
+
FROM prebuild AS build
|
76
76
|
|
77
77
|
<% end -%>
|
78
78
|
<% unless build_args.empty? -%>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
version: "3.8"
|
2
|
+
|
2
3
|
services:
|
3
4
|
web:
|
4
5
|
<% if all_args.empty? -%>
|
@@ -18,11 +19,14 @@ services:
|
|
18
19
|
secrets:
|
19
20
|
- gemserver_credentials
|
20
21
|
<% end -%>
|
22
|
+
<% end -%>
|
23
|
+
volumes:
|
24
|
+
<% compose_web_volumes.each do |path| -%>
|
25
|
+
- ./<%= path %>:/rails/<%= path %>
|
21
26
|
<% end -%>
|
22
27
|
ports:
|
23
28
|
- "3000:3000"
|
24
29
|
environment:
|
25
|
-
- RAILS_MASTER_KEY=$RAILS_MASTER_KEY
|
26
30
|
<% if using_redis? -%>
|
27
31
|
- REDIS_URL=redis://redis-db:6379
|
28
32
|
<% end -%>
|
@@ -35,10 +39,9 @@ services:
|
|
35
39
|
- DATABASE_URL=mysql2://root:password@mysql-db/
|
36
40
|
<% end -%>
|
37
41
|
<% end -%>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
<% end -%>
|
42
|
+
secrets:
|
43
|
+
- source: master_key
|
44
|
+
target: /rails/config/master.key
|
42
45
|
<% if using_redis? or deploy_database != 'sqlite3' -%>
|
43
46
|
depends_on:
|
44
47
|
<% if using_redis? -%>
|
@@ -60,9 +63,7 @@ services:
|
|
60
63
|
POSTGRES_USER: root
|
61
64
|
POSTGRES_PASSWORD: password
|
62
65
|
volumes:
|
63
|
-
- ./tmp/db:/var/lib/postgresql/data
|
64
|
-
ports:
|
65
|
-
- "5432:5432"
|
66
|
+
- ./tmp/postgres-db:/var/lib/postgresql/data
|
66
67
|
healthcheck:
|
67
68
|
test: pg_isready
|
68
69
|
interval: 2s
|
@@ -77,7 +78,7 @@ services:
|
|
77
78
|
environment:
|
78
79
|
MYSQL_ROOT_PASSWORD: password
|
79
80
|
volumes:
|
80
|
-
- ./tmp/db:/var/lib/mysql
|
81
|
+
- ./tmp/mysql-db:/var/lib/mysql
|
81
82
|
healthcheck:
|
82
83
|
test: mysqladmin ping -h 127.0.0.1 -u root --password=password
|
83
84
|
interval: 2s
|
@@ -132,3 +133,7 @@ secrets:
|
|
132
133
|
gemserver_credentials:
|
133
134
|
file: ./GEMSERVER_CREDENTIALS.secret.txt
|
134
135
|
<% end -%>
|
136
|
+
|
137
|
+
secrets:
|
138
|
+
master_key:
|
139
|
+
file: ./config/master.key
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerfile-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.5.
|
77
|
+
rubygems_version: 3.5.18
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Dockerfile generator for Rails
|