Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make needed changes for server deploys
- Loading branch information
Showing
37 changed files
with
565 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Application | ||
SCHOLAR_APPLICATION_URL=http://localhost:3000 | ||
SCHOLAR_JOB_QUEUE_ADAPTER=:inline | ||
SCHOLAR_PRODUCTION_MAILER_URL=localhost:3000 | ||
SCHOLAR_INITIALIZERS_SECRET_KEY=secret_key | ||
|
||
# Authentication/Shibboleth | ||
SCHOLAR_SHIBBOLETH_ENABLED=false | ||
SCHOLAR_SHIBBOLETH_LOGOUT= | ||
SCHOLAR_SIGNUPS_ENABLED=true | ||
|
||
# Browse Everything | ||
SCHOLAR_BROWSE_EVERYTHING_BOX_ID=box_id | ||
SCHOLAR_BROWSE_EVERYTHING_BOX_SECRET=box_secret | ||
SCHOLAR_BROWSE_EVERYTHING_KALTURA_ID=kaltura_id | ||
SCHOLAR_BROWSE_EVERYTHING_KALTURA_SECRET=kaltura_secret | ||
|
||
# Database settings | ||
SCHOLAR_DATABASE_ADAPTER=sqlite3 | ||
SCHOLAR_DATABASE_HOST= | ||
SCHOLAR_DATABASE_NAME=db/development.sqlite3 | ||
SCHOLAR_DATABASE_PASSWORD= | ||
SCHOLAR_DATABASE_POOL=5 | ||
SCHOLAR_DATABASE_PORT= | ||
SCHOLAR_DATABASE_TIMEOUT=5000 | ||
SCHOLAR_DATABASE_USERNAME= | ||
|
||
# Devise | ||
SCHOLAR_DEVISE_KEY=devise_secret_key | ||
|
||
# Google Analytics | ||
SCHOLAR_ANALYTICS_ID=analytics_id | ||
SCHOLAR_ANALYTICS_PRIVKEY_PATH=analytics_privkey_path | ||
SCHOLAR_ANALYTICS_PRIVKEY_SECRET=analytics_privkey_secret | ||
SCHOLAR_ANALYTICS_CLIENT_EMAIL=analytics_client_email | ||
|
||
# Google Re-captcha | ||
SCHOLAR_CAPTCHA_SITE_KEY=captcha_site_key | ||
SCHOLAR_CAPTCHA_SECRET_KEY=captcha_secret_key | ||
|
||
# ORCID | ||
ORCID_AUTHORIZE_URL=change_me | ||
ORCID_APP_ID=change_me | ||
ORCID_REMOTE_SIGNIN_URL=change_me | ||
ORCID_SANDBOX_BOOLEAN=true | ||
ORCID_APP_SECRET=change_me | ||
ORCID_SITE_URL=change_me | ||
OCRID_TOKEN_URL=change_me | ||
|
||
# Samvera | ||
SCHOLAR_CACHE_PATH=/tmp/cache | ||
SCHOLAR_DERIVATIVES_PATH=/tmp/derivatives | ||
SCHOLAR_FEDORA_PASSWORD=fedoraAdmin | ||
SCHOLAR_FEDORA_URL=http://127.0.0.1:8984/rest | ||
SCHOLAR_MINTER_STATE_FILE=/tmp/minter-state | ||
SCHOLAR_RIIIF_CACHE=/tmp/riiif | ||
SCHOLAR_SOFFICE_PATH=soffice | ||
SCHOLAR_SOLR_URL=http://127.0.0.1:8983/solr/hydra-development | ||
SCHOLAR_UPLOAD_PATH=/tmp/uploads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Application | ||
SCHOLAR_APPLICATION_URL=http://localhost:3000 | ||
SCHOLAR_JOB_QUEUE_ADAPTER=:inline | ||
SCHOLAR_PRODUCTION_MAILER_URL=localhost:3000 | ||
SCHOLAR_INITIALIZERS_SECRET_KEY=secret_key | ||
|
||
# Authentication/Shibboleth | ||
SCHOLAR_SHIBBOLETH_ENABLED=false | ||
SCHOLAR_SHIBBOLETH_LOGOUT= | ||
SCHOLAR_SIGNUPS_ENABLED=true | ||
|
||
# Browse Everything | ||
SCHOLAR_BROWSE_EVERYTHING_BOX_ID=box_id | ||
SCHOLAR_BROWSE_EVERYTHING_BOX_SECRET=box_secret | ||
SCHOLAR_BROWSE_EVERYTHING_KALTURA_ID=kaltura_id | ||
SCHOLAR_BROWSE_EVERYTHING_KALTURA_SECRET=kaltura_secret | ||
|
||
# Database settings | ||
SCHOLAR_DATABASE_ADAPTER=sqlite3 | ||
SCHOLAR_DATABASE_HOST= | ||
SCHOLAR_DATABASE_NAME=db/test.sqlite3 | ||
SCHOLAR_DATABASE_PASSWORD= | ||
SCHOLAR_DATABASE_POOL=5 | ||
SCHOLAR_DATABASE_PORT= | ||
SCHOLAR_DATABASE_TIMEOUT=30000 | ||
SCHOLAR_DATABASE_USERNAME= | ||
|
||
# Devise | ||
SCHOLAR_DEVISE_KEY=devise_secret_key | ||
|
||
# Google Analytics | ||
SCHOLAR_ANALYTICS_ID=analytics_id | ||
SCHOLAR_ANALYTICS_PRIVKEY_PATH=analytics_privkey_path | ||
SCHOLAR_ANALYTICS_PRIVKEY_SECRET=analytics_privkey_secret | ||
SCHOLAR_ANALYTICS_CLIENT_EMAIL=analytics_client_email | ||
|
||
# Google Re-captcha | ||
SCHOLAR_CAPTCHA_SITE_KEY=captcha_site_key | ||
SCHOLAR_CAPTCHA_SECRET_KEY=captcha_secret_key | ||
|
||
# ORCID | ||
ORCID_AUTHORIZE_URL=change_me | ||
ORCID_APP_ID=change_me | ||
ORCID_REMOTE_SIGNIN_URL=change_me | ||
ORCID_SANDBOX_BOOLEAN=true | ||
ORCID_APP_SECRET=change_me | ||
ORCID_SITE_URL=change_me | ||
OCRID_TOKEN_URL=change_me | ||
|
||
# Samvera | ||
SCHOLAR_CACHE_PATH=/tmp/cache | ||
SCHOLAR_DERIVATIVES_PATH=/tmp/derivatives | ||
SCHOLAR_FEDORA_PASSWORD=fedoraAdmin | ||
SCHOLAR_FEDORA_URL=http://127.0.0.1:8986/rest | ||
SCHOLAR_MINTER_STATE_FILE=/tmp/minter-state | ||
SCHOLAR_RIIIF_CACHE=/tmp/riiif | ||
SCHOLAR_SOFFICE_PATH=soffice | ||
SCHOLAR_SOLR_URL=http://127.0.0.1:8985/solr/hydra-test | ||
SCHOLAR_UPLOAD_PATH=/tmp/uploads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
require 'oauth2' | ||
require 'signet/oauth_2/client' | ||
require Hyrax::Engine.root.join('app/services/hyrax/analytics.rb') | ||
module Hyrax | ||
module Analytics | ||
class Config | ||
def self.load_from_yaml | ||
filename = Rails.root.join('config', 'analytics.yml') | ||
yaml = YAML.safe_load(ERB.new(File.read(filename)).result) | ||
unless yaml | ||
Rails.logger.error("Unable to fetch any keys from #{filename}.") | ||
return new({}) | ||
end | ||
new yaml.fetch('analytics') | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# | ||
# To integrate your app with Google Analytics, uncomment the lines below and add your API key information. | ||
# | ||
# analytics: | ||
# app_name: GOOGLE_OAUTH_APP_NAME | ||
# app_version: GOOGLE_OAUTH_APP_VERSION | ||
# privkey_path: GOOGLE_OAUTH_PRIVATE_KEY_PATH | ||
# privkey_secret: GOOGLE_OAUTH_PRIVATE_KEY_SECRET | ||
# client_email: GOOGLE_OAUTH_CLIENT_EMAIL | ||
analytics: | ||
app_name: GOOGLE_OAUTH_APP_NAME | ||
app_version: GOOGLE_OAUTH_APP_VERSION | ||
privkey_path: <%= ENV["SCHOLAR_ANALYTICS_PRIVKEY_PATH"] %> | ||
privkey_secret: <%= ENV["SCHOLAR_ANALYTICS_PRIVKEY_SECRET"] %> | ||
client_email: <%= ENV["SCHOLAR_ANALYTICS_CLIENT_EMAIL"] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +0,0 @@ | ||
# Replace below with bamboo variables for production | ||
|
||
ORCID_APP_ID: bamboo_orcid_id | ||
ORCID_APP_SECRET: bamboo_orcid_secret | ||
ORCID_SITE_URL: bamboo_orcid_site_url | ||
ORCID_TOKEN_URL: bamboo_orcid_token_url | ||
ORCID_REMOTE_SIGNIN_URL: bamboo_orcid_remote_signin_url | ||
ORCID_AUTHORIZE_URL: bamboo_orcid_authorize_url | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
development: | ||
shibboleth_enabled: false | ||
signups_enabled: true | ||
shibboleth_enabled: <%= ENV["SCHOLAR_SHIBBOLETH_ENABLED"] %> | ||
signups_enabled: <%= ENV["SCHOLAR_SIGNUPS_ENABLED"] %> | ||
|
||
test: | ||
shibboleth_enabled: true | ||
signups_enabled: false | ||
shibboleth_enabled: <%= ENV["SCHOLAR_SHIBBOLETH_ENABLED"] %> | ||
signups_enabled: <%= ENV["SCHOLAR_SIGNUPS_ENABLED"] %> | ||
|
||
production: | ||
shibboleth_enabled: true | ||
signups_enabled: false | ||
shibboleth_enabled: <%= ENV["SCHOLAR_SHIBBOLETH_ENABLED"] %> | ||
signups_enabled: <%= ENV["SCHOLAR_SIGNUPS_ENABLED"] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
development: | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_DEVELOPMENT_PORT', 8983)}/solr/hydra-development" %> | ||
url: <%= ENV['SCHOLAR_SOLR_URL'] %> | ||
test: &test | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/hydra-test" %> | ||
url: <%= ENV['SCHOLAR_SOLR_URL'] %> | ||
production: | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %> | ||
url: <%= ENV['SCHOLAR_SOLR_URL'] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,39 @@ | ||
# SQLite version 3.x | ||
# gem install sqlite3 | ||
# | ||
# Ensure the SQLite 3 gem is defined in your Gemfile | ||
# gem 'sqlite3' | ||
# | ||
default: &default | ||
adapter: sqlite3 | ||
pool: 5 | ||
timeout: 5000 | ||
<% | ||
socket = [ | ||
ENV["BOXEN_MYSQL_SOCKET"], | ||
"/var/run/mysql5/mysqld.sock", | ||
"/tmp/mysql.sock" | ||
].detect { |f| f && File.exist?(f) } | ||
port = ENV["SCHOLAR_DATABASE_PORT"] | ||
%> | ||
|
||
mysql_connection: &mysql_connection | ||
<% if socket %> | ||
host: <%= ENV["SCHOLAR_DATABASE_HOST"] %> | ||
socket: <%= socket %> | ||
<% else %> | ||
host: 127.0.0.1 | ||
port: <%= port %> | ||
<% end %> | ||
|
||
database_settings: &database_settings | ||
<<: *mysql_connection | ||
adapter: <%= ENV["SCHOLAR_DATABASE_ADAPTER"] %> | ||
pool: <%= ENV["SCHOLAR_DATABASE_POOL"] %> | ||
username: <%= ENV["SCHOLAR_DATABASE_USERNAME"] %> | ||
password: <%= ENV["SCHOLAR_DATABASE_PASSWORD"] %> | ||
database: <%= ENV["SCHOLAR_DATABASE_NAME"] %> | ||
host: <%= ENV["SCHOLAR_DATABASE_HOST"] %> | ||
timeout: <%= ENV["SCHOLAR_DATABASE_TIMEOUT"] %> | ||
encoding: utf8 | ||
RECONNECT: FALSE | ||
|
||
development: | ||
<<: *default | ||
database: db/development.sqlite3 | ||
<<: *database_settings | ||
|
||
# Warning: The database defined as "test" will be erased and | ||
# re-generated from your development database when you run "rake". | ||
# Do not set this db to the same as development or production. | ||
test: | ||
<<: *default | ||
database: db/test.sqlite3 | ||
timeout: 30000 | ||
<<: *database_settings | ||
|
||
production: | ||
<<: *default | ||
database: db/production.sqlite3 | ||
<<: *database_settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.