From 1cecb50de4b916e222809bfabe504f5fdb2683b0 Mon Sep 17 00:00:00 2001 From: Monique Rio Date: Fri, 23 Feb 2024 15:18:56 -0500 Subject: [PATCH] adds copying js to init script; changes how we do weblogin --- env.example | 5 +++-- get-this.rb | 6 +++--- init.sh | 5 ++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/env.example b/env.example index 01a64ef..39abcde 100644 --- a/env.example +++ b/env.example @@ -1,6 +1,7 @@ ALMA_API_KEY='YOUR-ALMA-API-KEY' -WEBLOGIN_SECRET='YOUR-WEBLOGIN-SECRET' -WEBLOGIN_ID='YOUR-WEBLOGIN-ID' +OIDC_CLIENT_SECRET='YOUR-OIDC-CLIENT-SECRET' +OIDC_CLIENT_ID='YOUR-OIDC-CLIENT-ID' +OIDC_ISSUER='https://your-oidc-issuer' WEBLOGIN_ON='false' ACCOUNT_URL='https://account.lib.umich.edu' BUNDLE_RUBYGEMS__PKG__GITHUB__COM="YOUR GITHUB TOKEN WITH READ PACKAGES" diff --git a/get-this.rb b/get-this.rb index 71fd29a..6de055d 100644 --- a/get-this.rb +++ b/get-this.rb @@ -25,13 +25,13 @@ use OmniAuth::Builder do provider :openid_connect, { - issuer: "https://weblogin.lib.umich.edu", + issuer: ENV["OIDC_ISSUER"], discovery: true, client_auth_method: "jwks", scope: [:openid, :profile, :email], client_options: { - identifier: ENV["WEBLOGIN_ID"], - secret: ENV["WEBLOGIN_SECRET"], + identifier: ENV["OIDC_CLIENT_ID"], + secret: ENV["OIDC_CLIENT_SECRET"], redirect_uri: "#{ENV["GET_THIS_BASE_URL"]}/auth/openid_connect/callback" } } diff --git a/init.sh b/init.sh index adb0e12..359f566 100755 --- a/init.sh +++ b/init.sh @@ -24,5 +24,8 @@ docker compose run --rm web bundle echo "📦 Installing Node modules" docker compose run --rm web npm install -echo "📦 Building js and css" +echo "📦 Building css" docker compose run --rm web npm run build + +echo "📦 Copying over js" +cp js/* public/bundles/