Skip to content

Commit 39416c5

Browse files
Upgrade kamal from 1.9.1 to 2.2.2 (#559)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 439eec0 commit 39416c5

File tree

5 files changed

+34
-75
lines changed

5 files changed

+34
-75
lines changed

.kamal/hooks/pre-connect

Lines changed: 0 additions & 43 deletions
This file was deleted.

.kamal/secrets

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
KAMAL_REGISTRY_USERNAME=$KAMAL_REGISTRY_USERNAME
2+
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
3+
4+
RAILS_MASTER_KEY=$RAILS_MASTER_KEY
5+
6+
REDIS_URL=$REDIS_URL
7+
8+
LITESTREAM_ACCESS_KEY_ID=$LITESTREAM_ACCESS_KEY_ID
9+
LITESTREAM_SECRET_ACCESS_KEY=$LITESTREAM_SECRET_ACCESS_KEY
10+
LITESTREAM_BUCKET=$LITESTREAM_BUCKET
11+
LITESTREAM_REGION=$LITESTREAM_REGION

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

44
ruby file: ".ruby-version"
55

6-
gem "dotenv-rails"
7-
86
gem "rails", github: "rails/rails"
97

8+
gem "dotenv-rails", require: "dotenv/load"
9+
1010
# Drivers
1111
gem "sqlite3"
1212
gem "puma"

Gemfile.lock

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@ GEM
106106
activesupport (>= 5.2.0)
107107
addressable (2.8.7)
108108
public_suffix (>= 2.0.2, < 7.0)
109-
airrecord (1.0.12)
110-
faraday (>= 1.0, < 3.0)
111-
faraday-net_http_persistent
112-
net-http-persistent
113109
appsignal (4.0.9)
114110
logger
115111
rack
@@ -189,10 +185,10 @@ GEM
189185
irb (~> 1.10)
190186
reline (>= 0.3.8)
191187
debug_inspector (1.2.0)
192-
dotenv (2.8.1)
193-
dotenv-rails (2.8.1)
194-
dotenv (= 2.8.1)
195-
railties (>= 3.2)
188+
dotenv (3.1.4)
189+
dotenv-rails (3.1.4)
190+
dotenv (= 3.1.4)
191+
railties (>= 6.1)
196192
drb (2.2.1)
197193
ed25519 (1.3.0)
198194
erubi (1.13.0)
@@ -206,9 +202,6 @@ GEM
206202
faraday (>= 1, < 3)
207203
faraday-net_http (3.3.0)
208204
net-http
209-
faraday-net_http_persistent (2.1.0)
210-
faraday (~> 2.5)
211-
net-http-persistent (~> 4.0)
212205
ferrum (0.15)
213206
addressable (~> 2.5)
214207
concurrent-ruby (~> 1.1)
@@ -249,16 +242,16 @@ GEM
249242
activesupport (>= 5.0.0)
250243
jmespath (1.6.2)
251244
json (2.7.2)
252-
kamal (1.9.1)
245+
kamal (2.2.2)
253246
activesupport (>= 7.0)
254247
base64 (~> 0.2)
255248
bcrypt_pbkdf (~> 1.0)
256249
concurrent-ruby (~> 1.2)
257-
dotenv (~> 2.8)
250+
dotenv (~> 3.1)
258251
ed25519 (~> 1.2)
259252
net-ssh (~> 7.0)
260253
sshkit (>= 1.23.0, < 2.0)
261-
thor (~> 1.2)
254+
thor (~> 1.3)
262255
zeitwerk (~> 2.5)
263256
language_server-protocol (3.17.0.3)
264257
launchy (3.0.1)
@@ -295,8 +288,6 @@ GEM
295288
msgpack (1.7.2)
296289
net-http (0.4.1)
297290
uri
298-
net-http-persistent (4.0.2)
299-
connection_pool (~> 2.2)
300291
net-imap (0.4.16)
301292
date
302293
net-protocol
@@ -310,7 +301,7 @@ GEM
310301
net-ssh (>= 5.0.0, < 8.0.0)
311302
net-smtp (0.5.0)
312303
net-protocol
313-
net-ssh (7.2.3)
304+
net-ssh (7.3.0)
314305
nio4r (2.7.3)
315306
nokogiri (1.16.7-aarch64-linux)
316307
racc (~> 1.4)

config/deploy.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
minimum_version: 1.1.0
1+
<% ENV["RAILS_ENV"] = "production" %>
2+
<% require_relative "config/application" %>
23

3-
service: hackathons
4+
minimum_version: 2.2.2
45

6+
service: hackathons
57
image: hackclub/hackathons
68

79
servers:
@@ -27,7 +29,7 @@ registry:
2729
- KAMAL_REGISTRY_PASSWORD
2830

2931
builder:
30-
multiarch: false
32+
arch: amd64
3133
cache:
3234
type: gha
3335
options: mode=max
@@ -40,8 +42,12 @@ env:
4042
- RAILS_MASTER_KEY
4143
- REDIS_URL
4244

45+
asset_path: "/hackathons/public/assets"
4346
volumes: ["hackathons-storage:/hackathons/storage"]
4447

48+
proxy:
49+
app_port: 3000
50+
4551
accessories:
4652
litestream:
4753
roles: ["web"]
@@ -51,13 +57,7 @@ accessories:
5157
cmd: replicate
5258
env:
5359
secret:
54-
- LITESTREAM_ACCESS_KEY_ID
55-
- LITESTREAM_SECRET_ACCESS_KEY
56-
- LITESTREAM_BUCKET
57-
- LITESTREAM_REGION
58-
59-
asset_path: "/hackathons/public/assets"
60-
61-
traefik:
62-
args:
63-
entrypoints.web.forwardedHeaders.trustedIPs: 10.0.0.0/8
60+
<% %w[BUCKET REGION ACCESS_KEY_ID SECRET_ACCESS_KEY].each do |secret| %>
61+
<% ENV["LITESTREAM_#{secret}"] = Rails.application.credentials.aws!.fetch(secret.downcase.to_sym) %>
62+
- LITESTREAM_<%= secret %>
63+
<% end %>

0 commit comments

Comments
 (0)