boxing 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +29 -29
- data/README.md +19 -0
- data/lib/boxing/config.rb +3 -2
- data/lib/boxing/database.rb +1 -1
- data/lib/boxing/version.rb +1 -1
- data/templates/Dockerfile.tt +12 -1
- data/templates/dockerignore.tt +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab97ea8a0276e762c9cd0f5736f19175fd233d4f552462c8fb1faadc8a121086
|
|
4
|
+
data.tar.gz: c5224a0d0ca31c95dff6b1ab6a021951f226acc935e8db4c7b73ea4154dd49b1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 737444f78fcd82b5db9a7613e36756ade56cef14d479ed9e60465a68c48a1402fb301de6111174ba0ad6f2e4d1aa3ae12e56f6470569d8f81bf65eda0de498ff
|
|
7
|
+
data.tar.gz: abec7450d007e6eba5dd33b682c6bee3ef2b3d88ea7d28443af281305c9b46258f71c1ab75ee473bfc464e00678a22236a3b1440b93641b70eec50e1d2a7e70e
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
boxing (0.
|
|
4
|
+
boxing (0.8.0)
|
|
5
5
|
bundler (~> 2.0)
|
|
6
6
|
thor (~> 1.0)
|
|
7
7
|
|
|
@@ -9,51 +9,51 @@ GEM
|
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
11
|
ast (2.4.2)
|
|
12
|
-
bundler-audit (0.9.
|
|
12
|
+
bundler-audit (0.9.1)
|
|
13
13
|
bundler (>= 1.2.0, < 3)
|
|
14
14
|
thor (~> 1.0)
|
|
15
15
|
childprocess (4.1.0)
|
|
16
|
-
diff-lcs (1.
|
|
16
|
+
diff-lcs (1.5.0)
|
|
17
17
|
docile (1.4.0)
|
|
18
18
|
iniparse (1.5.0)
|
|
19
|
-
overcommit (0.
|
|
19
|
+
overcommit (0.59.1)
|
|
20
20
|
childprocess (>= 0.6.3, < 5)
|
|
21
21
|
iniparse (~> 1.4)
|
|
22
22
|
rexml (~> 3.2)
|
|
23
|
-
parallel (1.
|
|
24
|
-
parser (3.
|
|
23
|
+
parallel (1.22.1)
|
|
24
|
+
parser (3.1.2.0)
|
|
25
25
|
ast (~> 2.4.1)
|
|
26
|
-
rainbow (3.
|
|
26
|
+
rainbow (3.1.1)
|
|
27
27
|
rake (13.0.6)
|
|
28
|
-
regexp_parser (2.
|
|
28
|
+
regexp_parser (2.4.0)
|
|
29
29
|
rexml (3.2.5)
|
|
30
|
-
rspec (3.
|
|
31
|
-
rspec-core (~> 3.
|
|
32
|
-
rspec-expectations (~> 3.
|
|
33
|
-
rspec-mocks (~> 3.
|
|
34
|
-
rspec-core (3.
|
|
35
|
-
rspec-support (~> 3.
|
|
36
|
-
rspec-expectations (3.
|
|
30
|
+
rspec (3.11.0)
|
|
31
|
+
rspec-core (~> 3.11.0)
|
|
32
|
+
rspec-expectations (~> 3.11.0)
|
|
33
|
+
rspec-mocks (~> 3.11.0)
|
|
34
|
+
rspec-core (3.11.0)
|
|
35
|
+
rspec-support (~> 3.11.0)
|
|
36
|
+
rspec-expectations (3.11.0)
|
|
37
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
38
|
-
rspec-support (~> 3.
|
|
39
|
-
rspec-mocks (3.
|
|
38
|
+
rspec-support (~> 3.11.0)
|
|
39
|
+
rspec-mocks (3.11.1)
|
|
40
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
41
|
-
rspec-support (~> 3.
|
|
42
|
-
rspec-support (3.
|
|
43
|
-
rubocop (1.
|
|
41
|
+
rspec-support (~> 3.11.0)
|
|
42
|
+
rspec-support (3.11.0)
|
|
43
|
+
rubocop (1.30.0)
|
|
44
44
|
parallel (~> 1.10)
|
|
45
|
-
parser (>= 3.
|
|
45
|
+
parser (>= 3.1.0.0)
|
|
46
46
|
rainbow (>= 2.2.2, < 4.0)
|
|
47
47
|
regexp_parser (>= 1.8, < 3.0)
|
|
48
|
-
rexml
|
|
49
|
-
rubocop-ast (>= 1.
|
|
48
|
+
rexml (>= 3.2.5, < 4.0)
|
|
49
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
|
50
50
|
ruby-progressbar (~> 1.7)
|
|
51
51
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
52
|
-
rubocop-ast (1.
|
|
53
|
-
parser (>= 3.
|
|
52
|
+
rubocop-ast (1.18.0)
|
|
53
|
+
parser (>= 3.1.1.0)
|
|
54
54
|
rubocop-rake (0.6.0)
|
|
55
55
|
rubocop (~> 1.0)
|
|
56
|
-
rubocop-rspec (2.
|
|
56
|
+
rubocop-rspec (2.11.1)
|
|
57
57
|
rubocop (~> 1.19)
|
|
58
58
|
ruby-progressbar (1.11.0)
|
|
59
59
|
simplecov (0.21.2)
|
|
@@ -61,8 +61,8 @@ GEM
|
|
|
61
61
|
simplecov-html (~> 0.11)
|
|
62
62
|
simplecov_json_formatter (~> 0.1)
|
|
63
63
|
simplecov-html (0.12.3)
|
|
64
|
-
simplecov_json_formatter (0.1.
|
|
65
|
-
thor (1.1
|
|
64
|
+
simplecov_json_formatter (0.1.4)
|
|
65
|
+
thor (1.2.1)
|
|
66
66
|
unicode-display_width (2.1.0)
|
|
67
67
|
|
|
68
68
|
PLATFORMS
|
|
@@ -82,4 +82,4 @@ DEPENDENCIES
|
|
|
82
82
|
simplecov
|
|
83
83
|
|
|
84
84
|
BUNDLED WITH
|
|
85
|
-
2.
|
|
85
|
+
2.3.14
|
data/README.md
CHANGED
|
@@ -109,6 +109,24 @@ Boxing.config do |c|
|
|
|
109
109
|
end
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
+
### Revision Information
|
|
113
|
+
|
|
114
|
+
```ruby
|
|
115
|
+
Boxing.config do |c|
|
|
116
|
+
c.revision = true
|
|
117
|
+
end
|
|
118
|
+
```
|
|
119
|
+
> When building the image, you have to add `--build-arg REVISION=...` to set your revision name to compile it correctly.
|
|
120
|
+
|
|
121
|
+
### Sentry Support
|
|
122
|
+
|
|
123
|
+
```ruby
|
|
124
|
+
Boxing.config do |c|
|
|
125
|
+
c.sentry_release = true
|
|
126
|
+
end
|
|
127
|
+
```
|
|
128
|
+
> When building the image, you have to add `--build-arg SENTRY_RELEASE=...` to set your release name to compile it correctly.
|
|
129
|
+
|
|
112
130
|
### Assets Precompile
|
|
113
131
|
|
|
114
132
|
This feature is disabled by default and suggest to use CI to build it.
|
|
@@ -120,6 +138,7 @@ Boxing.config do |c|
|
|
|
120
138
|
c.node_version = '14.18'
|
|
121
139
|
end
|
|
122
140
|
```
|
|
141
|
+
> When building the image, you have to add `--build-arg RAILS_MASTER_KEY=...` to set your production key to compile it correctly.
|
|
123
142
|
|
|
124
143
|
### Health Check
|
|
125
144
|
|
data/lib/boxing/config.rb
CHANGED
|
@@ -12,12 +12,13 @@ module Boxing
|
|
|
12
12
|
attr_accessor :root, :name, :registry, :ignores, :port,
|
|
13
13
|
:health_check, :health_check_path,
|
|
14
14
|
:assets_precompile, :node_version,
|
|
15
|
-
:build_packages, :runtime_packages
|
|
15
|
+
:build_packages, :runtime_packages,
|
|
16
|
+
:revision, :sentry_release
|
|
16
17
|
|
|
17
18
|
# @since 0.5.0
|
|
18
19
|
def initialize(&block)
|
|
19
20
|
@name = 'myapp'
|
|
20
|
-
@root = '/
|
|
21
|
+
@root = '/src/app'
|
|
21
22
|
@port = 9292
|
|
22
23
|
@health_check_path = '/status'
|
|
23
24
|
@assets_precompile = false
|
data/lib/boxing/database.rb
CHANGED
data/lib/boxing/version.rb
CHANGED
data/templates/Dockerfile.tt
CHANGED
|
@@ -26,6 +26,9 @@ RUN gem install bundler:<%= Bundler::VERSION %> \
|
|
|
26
26
|
FROM node:${NODE_VERSION}-alpine as node
|
|
27
27
|
FROM ruby:${RUBY_VERSION}-alpine as assets
|
|
28
28
|
ARG APP_ROOT
|
|
29
|
+
ARG RAILS_MASTER_KEY
|
|
30
|
+
|
|
31
|
+
ENV RAILS_MASTER_KEY $RAILS_MASTER_KEY
|
|
29
32
|
|
|
30
33
|
<%- if packages.select(&:runtime?).any? -%>
|
|
31
34
|
RUN apk add --no-cache <%= packages.select(&:runtime?).join(' ') %> yarn
|
|
@@ -68,10 +71,18 @@ ENV APP_ROOT=$APP_ROOT
|
|
|
68
71
|
COPY . ${APP_ROOT}
|
|
69
72
|
<%- if config.assets_precompile -%>COPY --from=assets /${APP_ROOT}/public /${APP_ROOT}/public
|
|
70
73
|
<%- end -%>
|
|
74
|
+
<%- if config.revision -%>
|
|
71
75
|
|
|
72
76
|
ARG REVISION
|
|
73
77
|
ENV REVISION $REVISION
|
|
74
|
-
|
|
78
|
+
ENV COMMIT_SHORT_SHA $REVISION
|
|
79
|
+
RUN echo "${REVISION}" > ${APP_ROOT}/REVISION
|
|
80
|
+
<%- end -%>
|
|
81
|
+
<%- if config.sentry_release -%>
|
|
82
|
+
|
|
83
|
+
ARG SENTRY_RELEASE
|
|
84
|
+
ENV SENTRY_RELEASE $SENTRY_RELEASE
|
|
85
|
+
<%- end -%>
|
|
75
86
|
|
|
76
87
|
# Apply Execute Permission
|
|
77
88
|
RUN adduser -h ${APP_ROOT} -D -s /bin/nologin ruby ruby && \
|
data/templates/dockerignore.tt
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: boxing
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 蒼時弦也
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
92
|
version: '0'
|
|
93
93
|
requirements: []
|
|
94
|
-
rubygems_version: 3.
|
|
94
|
+
rubygems_version: 3.1.6
|
|
95
95
|
signing_key:
|
|
96
96
|
specification_version: 4
|
|
97
97
|
summary: The zero-configuration Dockerfile generator for Ruby
|