From d0804bd7dc1f9c18605b4e7d7a201a202b40a55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 9 Aug 2026 19:04:19 -0600 Subject: [PATCH] akkounts: Set up Bun properly, upgrade Ruby --- nodes | 2 +- site-cookbooks/kosmos-akkounts/metadata.rb | 2 +- .../kosmos-akkounts/recipes/default.rb | 20 +++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/nodes b/nodes index 528c84f..ad6d254 160000 --- a/nodes +++ b/nodes @@ -1 +1 @@ -Subproject commit 528c84f98f800cc44d44d23dce7dce5dc919fb2e +Subproject commit ad6d254fabf770fbea86dc18875e6f24907d9389 diff --git a/site-cookbooks/kosmos-akkounts/metadata.rb b/site-cookbooks/kosmos-akkounts/metadata.rb index 7cf9255..18ed462 100644 --- a/site-cookbooks/kosmos-akkounts/metadata.rb +++ b/site-cookbooks/kosmos-akkounts/metadata.rb @@ -8,7 +8,7 @@ version '0.3.0' chef_version '>= 18.0' depends 'kosmos_openresty' -depends "kosmos-nodejs" +depends "ark" depends "postgresql" depends "kosmos_postgresql" depends "backup" diff --git a/site-cookbooks/kosmos-akkounts/recipes/default.rb b/site-cookbooks/kosmos-akkounts/recipes/default.rb index 1a14418..03cc57a 100644 --- a/site-cookbooks/kosmos-akkounts/recipes/default.rb +++ b/site-cookbooks/kosmos-akkounts/recipes/default.rb @@ -27,12 +27,24 @@ end package "libpq-dev" package "libvips" +package "unzip" -node.override["kosmos_nodejs"]["version"] = "22.23.1" -include_recipe 'kosmos-nodejs' -npm_package "bun" +bun_version = "1.3.14" +bun_checksum = "951ee2aee855f08595aeec6225226a298d3fea83a3dcd6465c09cbccdf7e848f" -ruby_version = "3.3.8" +ark "bun" do + url "https://github.com/oven-sh/bun/releases/download/bun-v#{bun_version}/bun-linux-x64.zip" + checksum bun_checksum + creates "bun" + path "/usr/local/bun/#{bun_version}/bin" + action :cherry_pick +end + +link "/usr/local/bin/bun" do + to "/usr/local/bun/#{bun_version}/bin/bun" +end + +ruby_version = "3.3.12" ruby_path = "/opt/ruby_build/builds/#{ruby_version}" bundle_path = "#{ruby_path}/bin/bundle" rails_env = node.chef_environment == "development" ? "development" : "production"