From 0d9e8b977512900d627829c65d6c002f174cf45c Mon Sep 17 00:00:00 2001 From: zunda Date: Wed, 24 Jul 2024 15:40:43 -1000 Subject: [PATCH] Refresh Heroku related thingy for heroku-24 stack This should make it possible to run Puma on Heroku with steps like: ``` $ export HEROKU_APP= $ heroku create --addons heroku-postgresql,heroku-redis -s heroku-24 $ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-activestorage-preview $ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-apt $ heroku buildpacks:add heroku/nodejs $ heroku buildpacks:add heroku/ruby $ heroku config:set \ OTP_SECRET=`ruby -r securerandom -e 'puts SecureRandom.hex(64)'` \ RAILS_SERVE_STATIC_FILES=true \ LOCAL_DOMAIN=`heroku domains --json | jq -r '.[] | select(.kind=="heroku").hostname'` \ `RAILS_ENV=production bin/rails db:encryption:init | grep ^ACTIVE_RECORD_ENCRYPTION_` $ git push heroku main $ heroku run rake db:migrate ``` --- .profile | 1 - Aptfile | 10 +++++----- Procfile | 2 +- app.json | 9 ++++++++- 4 files changed, 14 insertions(+), 8 deletions(-) delete mode 100644 .profile diff --git a/.profile b/.profile deleted file mode 100644 index f4826ea3033..00000000000 --- a/.profile +++ /dev/null @@ -1 +0,0 @@ -LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/app/.apt/lib/x86_64-linux-gnu:/app/.apt/usr/lib/x86_64-linux-gnu/mesa:/app/.apt/usr/lib/x86_64-linux-gnu/pulseaudio:/app/.apt/usr/lib/x86_64-linux-gnu/openblas-pthread diff --git a/Aptfile b/Aptfile index 5e033f13650..06c91d4c7b0 100644 --- a/Aptfile +++ b/Aptfile @@ -1,5 +1,5 @@ -ffmpeg -libopenblas0-pthread -libpq-dev -libxdamage1 -libxfixes3 +libidn12 +# for idn-ruby on heroku-24 stack + +# use https://github.com/heroku/heroku-buildpack-activestorage-preview +# in place for ffmpeg and its dependent packages to reduce slag size diff --git a/Procfile b/Procfile index d15c835b867..f033fd36c6b 100644 --- a/Procfile +++ b/Procfile @@ -11,4 +11,4 @@ worker: bundle exec sidekiq # # and let the main app use the separate app: # -# heroku config:set STREAMING_API_BASE_URL=wss://.herokuapp.com -a +# heroku config:set STREAMING_API_BASE_URL=wss://.herokuapp.com -a diff --git a/app.json b/app.json index 4f05a64f516..5e5a3dc1e7b 100644 --- a/app.json +++ b/app.json @@ -90,9 +90,15 @@ } }, "buildpacks": [ + { + "url": "https://github.com/heroku/heroku-buildpack-activestorage-preview" + }, { "url": "https://github.com/heroku/heroku-buildpack-apt" }, + { + "url": "heroku/nodejs" + }, { "url": "heroku/ruby" } @@ -100,5 +106,6 @@ "scripts": { "postdeploy": "bundle exec rails db:migrate && bundle exec rails db:seed" }, - "addons": ["heroku-postgresql", "heroku-redis"] + "addons": ["heroku-postgresql", "heroku-redis"], + "stack": "heroku-24" }