Compare commits

...

8 commits

Author SHA1 Message Date
1a1615e0ad Oops, fix regression of editor features on item lists page
I changed the type of this tag without realizing the JS references it
by both class and `div`!

I think at the time this was a perf suggestion for jQuery, because the
best way to query by class name was to query by tag first then filter?
It's possible our jQuery still does this, but I don't imagine it's very
relevant today, so I'll just remove that for better guarding against
similar bugs in the future instead.
2024-02-22 15:52:40 -08:00
666394de25 Refactor Impress 2020 config
I've moved the support secret into the encrypted credentials file, and
moved the origin into a top-level custom config value in the
environment files, with different defaults per environment but still
the ability to override it. (I don't use this, but it feels polite to
not actually *demand* that people use port 4000, y'know?)
2024-02-22 13:07:43 -08:00
f8f805bf4d Move matchu_email_password secret to encrypted credentials file 2024-02-22 12:51:04 -08:00
5b016673d7 Migrate secret key to Rails credentials file (and fix deprecation warn)
There's a bit happening behind the scenes of this change. Previously,
we kept a `SECRET_TOKEN` environment variable in `production.env`, and
used a `secret_token.rb` initializer to wire it up as the
`secret_key_base`.

In this change, we move to Rails's new-ish (two years old :p) encrypted
credentials system. Now, we set a `RAILS_MASTER_KEY` environment
variable in the deployed `production.env` instead (and in our local
`.env.production` in the project root for managing it), and we can run
`rails credentials:edit` to open the encrypted file in a text editor.

Inside, the content is just:
```yml
secret_key_base: "<OUR_SECRET_KEY>"
```

This indirection doesn't exactly do much for us functionally; it's just
the more standard way of achieving what our `secret_token.rb` situation
was achieving.

We could also migrate other secrets into there, and I just might! That
would simplify duplication between `/deploy/files/production.env` and
`/.env.production`, at any rate! The main notable one is
`MATCHU_EMAIL_PASSWORD` for sending auth emails from
`matchu@openneo.net` (and there's also a Stripe token that we don't
actually use in the app these days, those codepaths are old bones). Oh
and there's also the `IMPRESS_2020_SUPPORT_SECRET`!

Anyway, the motivation for this was to remove the warning when starting
the app that Devise is trying to use the deprecated
`Rails.application.secrets` method. I was expecting to have to do
[the workaround shared here](https://github.com/heartcombo/devise/issues/5644#issuecomment-1804626431),
but it turns out whatever default behavior Devise does under the hood
is happy enough with our new decision to use the credentials file, and
the deprecation warning is gone! Ok neat!
2024-02-22 12:36:30 -08:00
42bf4b8edb Use local gems instead of installing from web when deploying, oops!
I hadn't realized for a while that we weren't already doing this lol, I
had noticed that `bundle install` in production was slower than I
expected when adding new stuff, but it was when we did this big recent
`bundle update` that I really noticed the difference.

Fixed now, I think! Though the real test will come when we actually
have a new gem to install, since this was a no-op case.
2024-02-22 12:16:59 -08:00
472ae645a0 Finish migrating to Ruby 3.3.0
As the comment in `deploy.yml` explains, this was a multi-step process,
but it went very smoothly as planned, hooray!!

I noticed again while making this change that Bundler doesn't seem to
be availing itself of the checked-in dependencies in `vendor/cache`. I
think I know the fix for this, I'll toss it into an upcoming change and
see if it works!
2024-02-22 12:05:02 -08:00
b18dd115a1 Build Ruby 3.3.0, but don't switch over to it yet
Still need to test the app with it, and getting this to deploy right
will be a bit tricky! Here's my thinking for sequencing once the code
is ready:

1. Temporarily modify `deploy.yml` to push the version, but not set it
   as `current` or restart the app.
2. Update the service file to use Ruby 3.3.0 and reference that version
   directly (instead of `current`), and restart the app.
3. Once it's already running, link that version as `current`.
4. Update the service file to reference `current` as usual, and restart
   the app.
2024-02-22 11:48:48 -08:00
45579167dc Run bundle update
I also put in a manual bump for `falcon`!

The motivation is that I'm working on a Ruby 3.3.0 upgrade in another
branch, and I'm getting deprecation warnings from the `async` gem,
which I think are resolved in the latest version, so I figure, hey,
good time for an update!
2024-02-22 11:48:32 -08:00
124 changed files with 135 additions and 118 deletions

View file

@ -1 +1 @@
3.1.4
3.3.0

View file

@ -1,10 +1,10 @@
source 'https://rubygems.org'
ruby '3.1.4'
ruby '3.3.0'
gem 'rails', '~> 7.1', '>= 7.1.3.2'
# The HTTP server running the Rails instance.
gem 'falcon', '~> 0.42.3'
gem 'falcon', '~> 0.43.0'
# Our database is MySQL, in both development and production.
gem 'mysql2', '~> 0.5.5'

View file

@ -81,14 +81,14 @@ GEM
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
async (2.6.5)
async (2.8.1)
console (~> 1.10)
fiber-annotation
io-event (~> 1.1)
timers (~> 4.1)
async-container (0.16.12)
async-container (0.16.13)
async
async-io
async-http (0.61.0)
@ -101,7 +101,7 @@ GEM
traces (>= 0.10.0)
async-http-cache (0.4.3)
async-http (~> 0.56)
async-io (1.37.0)
async-io (1.41.0)
async
async-pool (0.4.0)
async (>= 1.25)
@ -109,19 +109,20 @@ GEM
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
base64 (0.1.1)
bcrypt (3.1.19)
bigdecimal (3.1.4)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.6)
bindex (0.8.1)
bootsnap (1.16.0)
bootsnap (1.18.3)
msgpack (~> 1.2)
build-environment (1.13.0)
builder (3.2.4)
concurrent-ruby (1.2.2)
connection_pool (2.2.5)
console (1.23.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
console (1.23.4)
fiber-annotation
fiber-local
json
crass (1.0.6)
date (3.3.4)
devise (4.9.3)
@ -136,11 +137,11 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
drb (2.1.1)
drb (2.2.0)
ruby2_keywords
erubi (1.12.0)
execjs (2.5.2)
falcon (0.42.3)
execjs (2.9.1)
falcon (0.43.0)
async
async-container (~> 0.16.0)
async-http (~> 0.57)
@ -153,12 +154,12 @@ GEM
process-metrics (~> 0.2.0)
protocol-rack (~> 0.1)
samovar (~> 2.1)
ffi (1.15.5)
ffi (1.16.3)
fiber-annotation (0.2.0)
fiber-local (1.0.0)
globalid (1.2.1)
activesupport (>= 6.1)
haml (6.1.1)
haml (6.3.0)
temple (>= 0.8.2)
thor
tilt
@ -168,19 +169,20 @@ GEM
multi_xml (>= 0.5.2)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
io-event (1.3.3)
irb (1.8.3)
io-console (0.7.2)
io-event (1.4.4)
irb (1.11.2)
rdoc
reline (>= 0.3.8)
jsbundling-rails (1.2.1)
reline (>= 0.4.2)
jsbundling-rails (1.3.0)
railties (>= 6.0.0)
json (2.7.1)
launchy (2.5.2)
addressable (~> 2.8)
letter_opener (1.8.1)
letter_opener (1.9.0)
launchy (>= 2.2, < 3)
localhost (1.1.10)
loofah (2.21.3)
localhost (1.2.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@ -192,12 +194,12 @@ GEM
marcel (1.0.2)
memory_profiler (1.0.1)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
minitest (5.19.0)
mini_portile2 (2.8.5)
minitest (5.22.2)
msgpack (1.7.2)
multi_xml (0.6.0)
mutex_m (0.1.2)
mysql2 (0.5.5)
mutex_m (0.2.0)
mysql2 (0.5.6)
net-imap (0.4.10)
date
net-protocol
@ -208,18 +210,18 @@ GEM
net-smtp (0.4.0.1)
net-protocol
nio4r (2.7.0)
nokogiri (1.15.3)
nokogiri (1.16.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
openssl (3.2.0)
orm_adapter (0.5.0)
parallel (1.23.0)
parallel (1.24.0)
process-metrics (0.2.1)
console (~> 1.8)
samovar (~> 2.1)
protocol-hpack (1.4.2)
protocol-http (0.25.0)
protocol-http1 (0.16.0)
protocol-http1 (0.16.1)
protocol-http (~> 0.22)
protocol-http2 (0.15.1)
protocol-hpack (~> 1.4)
@ -227,22 +229,22 @@ GEM
protocol-rack (0.4.1)
protocol-http (~> 0.23)
rack (>= 1.0)
psych (5.1.1.1)
psych (5.1.2)
stringio
public_suffix (5.0.3)
racc (1.7.1)
rack (2.2.8)
public_suffix (5.0.4)
racc (1.7.3)
rack (3.0.9.1)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-mini-profiler (3.1.1)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-session (1.0.1)
rack (< 3)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (1.0.0)
rack (< 3)
webrick
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.3.2)
actioncable (= 7.1.3.2)
actionmailbox (= 7.1.3.2)
@ -275,9 +277,9 @@ GEM
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.0.6)
rdiscount (2.2.7.1)
rdoc (6.5.0)
rake (13.1.0)
rdiscount (2.2.7.3)
rdoc (6.6.2)
psych (>= 4.0.0)
react-rails (2.7.1)
babel-transpiler (>= 0.7.0)
@ -287,7 +289,7 @@ GEM
tilt
record_tag_helper (1.0.1)
actionview (>= 5)
reline (0.3.9)
reline (0.4.2)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
@ -296,7 +298,7 @@ GEM
samovar (2.2.0)
console (~> 1.0)
mapping (~> 1.0)
sanitize (6.0.2)
sanitize (6.1.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
sass-rails (6.0.0)
@ -309,35 +311,35 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
sentry-rails (5.12.0)
sentry-rails (5.16.1)
railties (>= 5.0)
sentry-ruby (~> 5.12.0)
sentry-ruby (5.12.0)
sentry-ruby (~> 5.16.1)
sentry-ruby (5.16.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
sprockets (4.2.0)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.7.0)
sqlite3 (1.7.2)
mini_portile2 (~> 2.8.0)
stackprof (0.2.25)
stringio (3.0.8)
temple (0.8.2)
terser (1.1.17)
stackprof (0.2.26)
stringio (3.1.0)
temple (0.10.3)
terser (1.2.0)
execjs (>= 0.3.0, < 3)
thor (1.2.2)
thor (1.3.0)
thread-local (1.1.0)
tilt (2.2.0)
tilt (2.3.0)
timeout (0.4.1)
timers (4.3.5)
traces (0.11.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
warden (1.2.7)
rack (>= 1.0)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
@ -348,7 +350,7 @@ GEM
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (4.0.0)
zeitwerk (2.6.11)
zeitwerk (2.6.13)
PLATFORMS
ruby
@ -362,7 +364,7 @@ DEPENDENCIES
devise (~> 4.9, >= 4.9.2)
devise-encryptable (~> 0.2.0)
dotenv-rails (~> 2.8, >= 2.8.1)
falcon (~> 0.42.3)
falcon (~> 0.43.0)
haml (~> 6.1, >= 6.1.1)
http_accept_language (~> 2.1, >= 2.1.1)
httparty (~> 0.21.0)
@ -392,7 +394,7 @@ DEPENDENCIES
will_paginate (~> 4.0)
RUBY VERSION
ruby 3.1.4p223
ruby 3.3.0p0
BUNDLED WITH
2.3.26
2.5.5

View file

@ -23,7 +23,7 @@
var hangerGroups = [];
$("div.closet-hangers-group").each(function () {
$(".closet-hangers-group").each(function () {
var el = $(this);
var lists = [];
@ -45,7 +45,7 @@
};
});
$("div.closet-hangers-group span.toggle").live("click", function () {
$(".closet-hangers-group span.toggle").live("click", function () {
$(this).closest(".closet-hangers-group").toggleClass("hidden");
});
@ -112,7 +112,7 @@
onHangersInit(function () {
// Super-lame hack to get the user ID from where it already is :/
var currentUserId = itemsSearchForm.data("current-user-id");
$("#closet-hangers div.closet-hangers-group").each(function () {
$("#closet-hangers .closet-hangers-group").each(function () {
var groupEl = $(this);
var owned = groupEl.data("owned");
@ -244,7 +244,7 @@
return $("#closet-list-" + id);
} else {
return $(
"div.closet-hangers-group[data-owned=" +
".closet-hangers-group[data-owned=" +
owned +
"] div.closet-list.unlisted",
);
@ -615,7 +615,7 @@
for (var i in hangerGroups) {
group = hangerGroups[i];
itemEl = $(
"div.closet-hangers-group[data-owned=" +
".closet-hangers-group[data-owned=" +
group.owned +
"] div.object[data-item-id=" +
item.id +

View file

@ -93,13 +93,15 @@ module ApplicationHelper
end
def impress_2020_meta_tags
impress_2020 = Rails.configuration.x.impress_2020
origin = Rails.configuration.impress_2020_origin
support_secret = Rails.application.credentials.impress_2020.support_secret
capture do
concat tag("meta", name: "impress-2020-origin",
content: impress_2020.origin)
if support_staff? && impress_2020.support_secret.present?
concat tag("meta", name: "impress-2020-origin", content: origin)
if support_staff? && support_secret.present?
concat tag("meta", name: "impress-2020-support-secret",
content: impress_2020.support_secret)
content: support_secret)
end
end
end

View file

@ -62,7 +62,7 @@ class Outfit < ApplicationRecord
end
IMAGE_URL_TEMPLATE = Addressable::Template.new(
Rails.configuration.x.impress_2020.origin +
Rails.configuration.impress_2020_origin +
"/api/outfitImage{?id,size,updatedAt}"
)
def image_versions

View file

@ -0,0 +1 @@
b0WTE8+0LBv1VLmSEw0wmJJmjFctFHF9oIM4xKHJsWapYBppphc3Lvx+cCvIZRq9+K0KSR+ugkJKd+c8UqW0RxanjDFm4o7aZpxpI4WuKzqjcYhnBHXzx5HFdlLkXqPoU3NgSPvcPVPEk5AW5jPSCB7MBQOr4S5l1/mybJX4m0AlhoyXVAaPGOb0vZ3skk0eLeFn60aRq4TTrG7xiSkxfH5X0cOjPpNBmN/s03A8z72oYSy9Oa28V0GjFkXhxN9jnOpZJ/P3RBRovGInpcCFcle/EIUl/O+l9VP1tfR+szhBSbCXA2/wYedaZIvTuwF6iyCYz2k3lgD9qr3iQ+mACxoa/a2PE6grsSHD/FTzIcQPxmivoUFiRMtBdrJHCX6JUboprWG+y5SrQYFtJ0JkjpfnJYb4sqszMyQkvOP+GvQQ++CQFYHlD1fBweCKwFD6GNevj2AuCdxFGnCUn8Vjkj++qk8o63LsbO++6iFQXZnVMFC+7Cgq7Xnp74oDs1Jg9UD8uYHZcKQGcJv7y86BSAyuMb6lwlQqUhdfG7k/PpN0f2yC6JLAqKZ8VChTVjn62TIXkTenPY6ZsKwk9wstNAjVukCCGKXDt4uaRIurQnBT2lkTHdqnMIiYSEqBlvc/yAuDyxyXqndMvYhDsdetNdnIxATRkpA+mU4CHlgcv30J5l3obLN8UA0oHPL9lTMWU63E4JyQTwVEHGLy+J8TMZgJX1imCCzCzWL7ytdDy7HdZFXrVPxj+z95/PH//2NcvuAdwbnKX7Pk0ujEBwSnkmiw1UZgl5VT5G2yLwYqFY1VgyINBN42ynFFRfiNjk9Q9bIHk3i2bQnDAw9EtAuKbpdJ9IXboTAOHOIZpanW6RiIfIGk+MM5GLKOSthv6XCzhLue7P//tprHT85yE1vnhLNeCGg1EtgDlM9y--xXvKjFS/mwn+dHoa--u457xDa2Q8CLtVbYkL6pig==

View file

@ -102,4 +102,9 @@ Rails.application.configure do
# Allow connections on Vagrant's private network.
config.web_console.permissions = '10.0.2.2'
# Use a local copy of Impress 2020, presumably running on port 4000. (Can
# override this with the IMPRESS_2020_ORIGIN environment variable!)
config.impress_2020_origin = ENV.fetch("IMPRESS_2020_ORIGIN",
"http://localhost:4000")
end

View file

@ -89,7 +89,7 @@ Rails.application.configure do
:domain => "openneo.net",
:authentication => :login,
:user_name => "matchu@openneo.net",
:password => ENV.fetch("MATCHU_EMAIL_PASSWORD"),
:password => Rails.application.credentials.matchu_email_password,
:enable_starttls_auto => false
}
config.action_mailer.raise_delivery_errors = true
@ -121,4 +121,9 @@ Rails.application.configure do
# ]
# Skip DNS rebinding protection for the default health check endpoint.
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
# Use the live copy of Impress 2020. (Can override this with the
# IMPRESS_2020_ORIGIN environment variable!)
config.impress_2020_origin = ENV.fetch("IMPRESS_2020_ORIGIN",
"https://impress-2020.openneo.net")
end

View file

@ -61,4 +61,9 @@ Rails.application.configure do
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true
# Use a local copy of Impress 2020, presumably running on port 4000. (Can
# override this with the IMPRESS_2020_ORIGIN environment variable!)
config.impress_2020_origin = ENV.fetch("IMPRESS_2020_ORIGIN",
"http://localhost:4000")
end

View file

@ -1,5 +0,0 @@
Rails.configuration.x.impress_2020.origin =
ENV.fetch("IMPRESS_2020_ORIGIN", "https://impress-2020.openneo.net")
Rails.configuration.x.impress_2020.support_secret =
ENV.fetch("IMPRESS_2020_SUPPORT_SECRET", nil)

View file

@ -1,19 +0,0 @@
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure your secret_key_base is kept private
# if you're sharing your code publicly.
if Rails.env.development? || Rails.env.test?
# In development, we use a hardcoded secret key, because it doesn't actually
# need to be secret!
OpenneoImpressItems::Application.config.secret_key_base = "7584841652f89044a8b5a428efa6dfac2461449eb24741a33668cd642130d79f93b0347766ebf4a4d7d5033a263c36431594ad56b5735a7325c8cdda991219c2"
else
# In general, we use the SECRET_TOKEN provided as an environment variable!
OpenneoImpressItems::Application.config.secret_key_base = ENV.fetch('SECRET_TOKEN')
end

View file

@ -91,7 +91,7 @@ OpenneoImpressItems::Application.routes.draw do
# Static pages!
get '/terms', as: :terms,
to: redirect(Rails.configuration.x.impress_2020.origin + "/terms")
to: redirect(Rails.configuration.impress_2020_origin + "/terms")
# Other useful lil things!
get '/sitemap.xml' => 'sitemap#index', :as => :sitemap, :format => :xml

View file

@ -9,6 +9,19 @@
# deploy:setup should have added us to the "impress-deployers" group, so we
# should be able to become the "impress" user without a password.
ansible_become_password: ""
# Set this to `yes` to skip setting this version as `current`. (We also
# skip our usual cleanup, to avoid disrupting the `current` version!)
#
# This can be useful for upgrading our Ruby version without downtime:
# 1. Install the new Ruby version, but don't uninstall the old one.
# 2. Update the app to reference the new Ruby version in the `Gemfile`.
# 3. Deploy the app with `skip_set_as_current`.
# 4. Update the service file manually to use the new Ruby to run the new
# version of the app, referenced directly by path.
# 5. Link the new version as `current` manually.
# 6. Reset the service file to use the new Ruby to run `current`.
skip_set_as_current: no
tasks:
- name: Generate a version name from the current timestamp
command: date '+%Y-%m-%d-%s'
@ -41,7 +54,7 @@
- name: Configure Bundler to run in deployment mode
command:
chdir: "{{ remote_app_root }}"
cmd: /opt/ruby-3.1.4/bin/bundle config set --local deployment true
cmd: /opt/ruby-3.3.0/bin/bundle config set --local deployment true
# This ensures that, while attempting our current deploy, we don't
# accidentally delete gems out from under the currently-running version.
@ -51,7 +64,7 @@
- name: Configure Bundler to *not* clean up old gems when installing
command:
chdir: "{{ remote_app_root }}"
cmd: /opt/ruby-3.1.4/bin/bundle config set --local clean false
cmd: /opt/ruby-3.3.0/bin/bundle config set --local clean false
# NOTE: Bundler recommends this, and they're pretty smart about it: if the
# Gemfile changes, this shouldn't disrupt the currently-running version,
@ -60,18 +73,22 @@
- name: Configure Bundler to use the bundle folder shared by all app versions
command:
chdir: "{{ remote_app_root }}"
cmd: "/opt/ruby-3.1.4/bin/bundle config set --local path {{ remote_project_root}}/shared/bundle"
cmd: "/opt/ruby-3.3.0/bin/bundle config set --local path {{ remote_project_root}}/shared/bundle"
- name: Run `bundle install` to install dependencies in remote folder
command:
chdir: "{{ remote_app_root }}"
cmd: /opt/ruby-3.1.4/bin/bundle install
# The `--local` flag instructs Bundler to use the cached dependencies
# in `vendor/cache`, instead of reading from the web, which is much
# faster and more reliable!
cmd: /opt/ruby-3.3.0/bin/bundle install --local
- name: Update the `current` folder to point to the new version
file:
src: "{{ remote_app_root }}"
dest: /srv/impress/current
state: link
when: not skip_set_as_current
# NOTE: This uses the passwordless sudo rule we set up in deploy:setup.
# We write it as a command rather than using the built-in `systemd` Ansible
@ -83,11 +100,13 @@
- name: Restart the app
become: no
command: sudo systemctl restart impress
when: not skip_set_as_current
- name: Clean up gems no longer used in the current app version
command:
chdir: "{{ remote_app_root }}"
cmd: /opt/ruby-3.1.4/bin/bundle clean
cmd: /opt/ruby-3.3.0/bin/bundle clean
when: not skip_set_as_current
- name: Find older app versions to clean up
# Print out all but the 5 last-recently-updated versions.
@ -95,9 +114,11 @@
chdir: "{{ remote_project_root }}/versions"
cmd: bash -c 'ls -t | tail -n +6'
register: versions_to_clean_up
when: not skip_set_as_current
- name: Clean up older versions
file:
path: "{{ remote_project_root }}/versions/{{ item }}"
state: absent
with_items: "{{ versions_to_clean_up.stdout_lines }}"
when: not skip_set_as_current

View file

@ -5,7 +5,7 @@ Description=Dress to Impress webapp
User=impress
Restart=always
WorkingDirectory=/srv/impress/current
ExecStart=/opt/ruby-3.1.4/bin/bundle exec falcon host
ExecStart=/opt/ruby-3.3.0/bin/bundle exec falcon host
Environment="RAILS_ENV=production"
; Set EXECJS_RUNTIME to save us from needing to install Node
Environment="EXECJS_RUNTIME=Disabled"

View file

@ -166,21 +166,21 @@
git:
repo: https://github.com/rbenv/ruby-build.git
dest: /opt/ruby-build
version: 4d4678bc1ed89aa6900c0ea0da23495445dbcf50
version: e1b36a32fb87d61955ac38f1889b7e3cb3b2f407
- name: Check if Ruby 3.1.4 is already installed
- name: Check if Ruby 3.3.0 is already installed
stat:
path: /opt/ruby-3.1.4
path: /opt/ruby-3.3.0
register: ruby_dir
- name: Install Ruby 3.1.4
command: "/opt/ruby-build/bin/ruby-build 3.1.4 /opt/ruby-3.1.4"
- name: Install Ruby 3.3.0
command: "/opt/ruby-build/bin/ruby-build 3.3.0 /opt/ruby-3.3.0"
when: not ruby_dir.stat.exists
- name: Add Ruby 3.1.4 to the global PATH, for developer convenience
- name: Add Ruby 3.3.0 to the global PATH, for developer convenience
lineinfile:
dest: /etc/profile
line: 'PATH="/opt/ruby-3.1.4/bin:$PATH" # Added by impress deploy setup script'
line: 'PATH="/opt/ruby-3.3.0/bin:$PATH" # Added by impress deploy setup script'
- name: Install system dependencies for impress's Ruby gems
apt:
@ -244,14 +244,14 @@
become_user: impress
command:
chdir: /srv/impress/versions/initial-placeholder
cmd: /opt/ruby-3.1.4/bin/bundle config set --local deployment true
cmd: /opt/ruby-3.3.0/bin/bundle config set --local deployment true
when: not current_app_version.stat.exists
- name: Install the placeholder app's dependencies
become_user: impress
command:
chdir: /srv/impress/versions/initial-placeholder
cmd: /opt/ruby-3.1.4/bin/bundle install
cmd: /opt/ruby-3.3.0/bin/bundle install
when: not current_app_version.stat.exists
- name: Set the placeholder app as the current version

Binary file not shown.

BIN
vendor/cache/addressable-2.8.6.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/async-2.8.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/async-container-0.16.13.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/async-io-1.41.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/base64-0.2.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/bcrypt-3.1.20.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/bigdecimal-3.1.6.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/bootsnap-1.18.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/concurrent-ruby-1.2.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/connection_pool-2.4.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/console-1.23.4.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/drb-2.2.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/execjs-2.9.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/falcon-0.43.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/ffi-1.16.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/haml-6.3.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/io-console-0.7.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/io-event-1.4.4.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/irb-1.11.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/jsbundling-rails-1.3.0.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/json-2.7.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/letter_opener-1.9.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/localhost-1.2.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/loofah-2.22.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/minitest-5.22.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/mutex_m-0.2.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/mysql2-0.5.6.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/parallel-1.24.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/protocol-http1-0.16.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/psych-5.1.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/public_suffix-5.0.4.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/racc-1.7.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-3.0.9.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-session-2.0.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rackup-2.1.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rake-13.1.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rdiscount-2.2.7.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rdoc-6.6.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/reline-0.4.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/sanitize-6.1.0.gem vendored Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more