Compare commits

..

No commits in common. "02b510bb3f61f8cc0869b60da1e3ad935746af8a" and "5bf2ef42a0b2f42674edb276ce83c271600c838c" have entirely different histories.

6 changed files with 21 additions and 24 deletions

View file

@ -1 +1 @@
3.3.5
3.3.4

View file

@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby '3.3.5'
ruby '3.3.4'
gem 'rails', '~> 7.1', '>= 7.1.3.4'

View file

@ -6,8 +6,6 @@
vars:
local_app_root: "{{ playbook_dir }}/.."
remote_project_root: "/srv/impress"
ruby_version: "3.3.5"
# 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: ""
@ -62,7 +60,7 @@
- name: Configure Bundler to run in deployment mode
command:
chdir: "{{ remote_app_root }}"
cmd: /opt/ruby-{{ ruby_version }}/bin/bundle config set --local deployment true
cmd: /opt/ruby-3.3.4/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.
@ -72,7 +70,7 @@
- name: Configure Bundler to *not* clean up old gems when installing
command:
chdir: "{{ remote_app_root }}"
cmd: /opt/ruby-{{ ruby_version }}/bin/bundle config set --local clean false
cmd: /opt/ruby-3.3.4/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,
@ -81,7 +79,7 @@
- name: Configure Bundler to use the bundle folder shared by all app versions
command:
chdir: "{{ remote_app_root }}"
cmd: "/opt/ruby-{{ ruby_version }}/bin/bundle config set --local path {{ remote_project_root}}/shared/bundle"
cmd: "/opt/ruby-3.3.4/bin/bundle config set --local path {{ remote_project_root}}/shared/bundle"
- name: Run `bundle install` to install dependencies in remote folder
command:
@ -89,7 +87,7 @@
# 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-{{ ruby_version }}/bin/bundle install --local
cmd: /opt/ruby-3.3.4/bin/bundle install --local
- name: Update the `current` folder to point to the new version
file:
@ -113,7 +111,7 @@
- name: Clean up gems no longer used in the current app version
command:
chdir: "{{ remote_app_root }}"
cmd: /opt/ruby-{{ ruby_version }}/bin/bundle clean
cmd: /opt/ruby-3.3.4/bin/bundle clean
when: not skip_set_as_current
- name: Find older app versions to clean up

View file

@ -5,7 +5,7 @@ Description=Dress to Impress webapp
User=impress
Restart=always
WorkingDirectory=/srv/impress/current
ExecStart=/opt/ruby-{{ ruby_version }}/bin/bundle exec falcon host
ExecStart=/opt/ruby-3.3.4/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

@ -6,7 +6,6 @@
vars:
email_address: "emi@matchu.dev" # TODO: Extract this to personal config?
impress_hostname: impress.openneo.net
ruby_version: "3.3.5"
vars_files:
# mysql_root_password, mysql_user_password, mysql_user_password_2020,
# dev_ips
@ -171,21 +170,21 @@
git:
repo: https://github.com/rbenv/ruby-build.git
dest: /opt/ruby-build
version: v20240917
version: d22fa95a6e4c77945304c16ebe0d9513fec98cfb
- name: Check if Ruby {{ ruby_version }} is already installed
- name: Check if Ruby 3.3.4 is already installed
stat:
path: /opt/ruby-{{ ruby_version }}
path: /opt/ruby-3.3.4
register: ruby_dir
- name: Install Ruby {{ ruby_version }}
command: "/opt/ruby-build/bin/ruby-build {{ ruby_version }} /opt/ruby-{{ ruby_version }}"
- name: Install Ruby 3.3.4
command: "/opt/ruby-build/bin/ruby-build 3.3.4 /opt/ruby-3.3.4"
when: not ruby_dir.stat.exists
- name: Add Ruby {{ ruby_version }} to the global PATH, for developer convenience
- name: Add Ruby 3.3.4 to the global PATH, for developer convenience
copy:
dest: /etc/profile.d/ruby_path.sh
content: PATH="/opt/ruby-{{ ruby_version }}/bin:$PATH"
content: PATH="/opt/ruby-3.3.4/bin:$PATH"
- name: Install system dependencies for impress's Ruby gems
apt:
@ -249,14 +248,14 @@
become_user: impress
command:
chdir: /srv/impress/versions/initial-placeholder
cmd: /opt/ruby-{{ ruby_version }}/bin/bundle config set --local deployment true
cmd: /opt/ruby-3.3.4/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-{{ ruby_version }}/bin/bundle install
cmd: /opt/ruby-3.3.4/bin/bundle install
when: not current_app_version.stat.exists
- name: Set the placeholder app as the current version
@ -288,8 +287,8 @@
state: directory
- name: Create service file for impress
template:
src: files/impress.service.j2
copy:
src: files/impress.service
dest: /etc/systemd/system/impress.service
notify:
- Reload systemctl

View file

@ -53,5 +53,5 @@
"prettier": {
"useTabs": true
},
"packageManager": "yarn@4.5.0"
"packageManager": "yarn@4.4.1"
}