Skip to content

Commit

Permalink
Use HYRAX_ env prefix (#23)
Browse files Browse the repository at this point in the history
* Use HYRAX_ env prefix

* Update config.yml

* Update docker-compose.yml
  • Loading branch information
dlpierce authored Aug 18, 2023
1 parent 8993ab4 commit b2ae93a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
DATABASE_USERNAME: postgres
POSTGRES_HOST: 127.0.0.1
POSTGRES_USER: postgres
WORKING_PATH: /tmp
UPLOAD_PATH: /tmp
CACHE_PATH: /tmp/cache
HYRAX_UPLOADS_PATH: /tmp
HYRAX_CACHE_PATH: /tmp/cache
CIRCLE_FEDORA_URL: http://127.0.0.1:8080/fcrepo/rest
CIRCLE_SOLR_URL: http://127.0.0.1:8985/solr/hydra-test
executor:
Expand Down
8 changes: 4 additions & 4 deletions config/initializers/hyrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@

# Temporary paths to hold uploads before they are ingested into FCrepo
# These must be lambdas that return a Pathname. Can be configured separately
config.upload_path = ->() { ENV.fetch('UPLOADS_PATH', Rails.root.join('..', '..', 'shared', 'uploads')) }
config.cache_path = ->() { ENV.fetch('CACHE_PATH', Rails.root.join('..', '..', 'shared', 'uploads', 'cache')) }
config.upload_path = ->() { ENV.fetch('HYRAX_UPLOADS_PATH', Rails.root.join('..', '..', 'shared', 'uploads')) }
config.cache_path = ->() { ENV.fetch('HYRAX_CACHE_PATH', Rails.root.join('..', '..', 'shared', 'uploads', 'cache')) }

# Location on local file system where derivatives will be stored
# If you use a multi-server architecture, this MUST be a shared volume
config.derivatives_path = ENV.fetch('DERIVATIVES_PATH', '/opt/derivatives')
config.derivatives_path = ENV.fetch('HYRAX_DERIVATIVES_PATH', '/opt/derivatives')

# Should schema.org microdata be displayed?
# config.display_microdata = true
Expand All @@ -177,7 +177,7 @@
# Location on local file system where uploaded files will be staged
# prior to being ingested into the repository or having derivatives generated.
# If you use a multi-server architecture, this MUST be a shared volume.
config.working_path = ENV.fetch('UPLOADS_PATH', Rails.root.join('..', '..', 'shared', 'uploads'))
config.working_path = ENV.fetch('HYRAX_UPLOADS_PATH', Rails.root.join('..', '..', 'shared', 'uploads'))

# Should the media display partial render a download link?
# config.display_media_download_link = true
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ services:
dev: &dev
<<: *app
environment:
- CACHE_PATH=/data/tmp/uploads/cache
- HYRAX_CACHE_PATH=/data/tmp/uploads/cache
- DB_NAME=development
- DB_HOST=db-dev
- DB_PASSWORD=postgres
- DB_PORT='5432'
- DB_USERNAME=postgres
- DERIVATIVES_PATH=/data/tmp/derivatives
- HYRAX_DERIVATIVES_PATH=/data/tmp/derivatives
- FEDORA_URL=http://fcrepo-dev:8080/fcrepo/rest
- FITS_PATH=/opt/fits-1.0.5/fits.sh
- RAILS_ENV=development
Expand All @@ -51,7 +51,7 @@ services:
- REDIS_PORT='6379'
- SECRET_KEY_BASE=bobross
- SOLR_URL=http://solr-dev:8983/solr/development
- UPLOADS_PATH=/data/tmp/uploads
- HYRAX_UPLOADS_PATH=/data/tmp/uploads
depends_on:
- db-dev
- solr-dev
Expand Down Expand Up @@ -81,21 +81,21 @@ services:
test: &test
<<: *app
environment:
- CACHE_PATH=/data/tmp/uploads/cache
- HYRAX_CACHE_PATH=/data/tmp/uploads/cache
- DB_NAME=test
- DB_HOST=db-dev
- DB_PASSWORD=postgres
- DB_PORT='5432'
- DB_USERNAME=postgres
- DERIVATIVES_PATH=/data/tmp/derivatives
- HYRAX_DERIVATIVES_PATH=/data/tmp/derivatives
- FEDORA_URL=http://fcrepo-test:8080/fcrepo/rest
- FITS_PATH=/opt/fits-1.0.5/fits.sh
- RAILS_ENV=test
- REDIS_HOST=redis-test
- REDIS_PORT='6379'
- SECRET_KEY_BASE=bobross
- SOLR_URL=http://solr-test:8983/solr/test
- UPLOADS_PATH=/data/tmp/uploads
- HYRAX_UPLOADS_PATH=/data/tmp/uploads
depends_on:
- db-test
- solr-test
Expand Down

0 comments on commit b2ae93a

Please sign in to comment.