forked from umd-lib/archelon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LIBFCREPO-1471. Added "dotenv" gem and ".env" files
Added the "dotenv" gem to the "Gemfile" (the "dotenv-rails" gem is no longer needed -- we can use "dotenv" directly). Added "env_example" and ".env.development" files from the legacy Archelon. Modified the ".gitignore" file as in legacy Archelon to enable the ".env.development" file to be included in Git. Rails 7.1 uses the “foreman” gem to run the asset pipeline watchers and the Rails server, via the “bin/dev” script. As described in <ddollar/foreman#702>, “foreman” and the “dotenv” gem conflict when reading in the environment variables (any environment variables in the CLI environment are ignored, instead of overriding the variables in the various “.env” files). Used the workaround of adding `--env=/dev/null` to the “foreman” command in the “bin/dev” script so that the CLI environment variables and “.env” files will work as expected (i.e., that the CLI environment variables take precedence over the “.env” files). https://umd-dit.atlassian.net/browse/LIBFCREPO-1471
- Loading branch information
1 parent
279ac73
commit 0f2051d
Showing
6 changed files
with
214 additions
and
4 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,70 @@ | ||
# Entries in this file OVERRIDE entries in the ".env" file. | ||
# | ||
# This file is provides default values for non-workstation-specific, | ||
# non-secret environment variables for use in a development environment | ||
# consisting of Archelon running in a Docker container | ||
# and Plastron on a local workstation. | ||
# | ||
# Workstation-specific or private/secret environment variable settings should | ||
# be made in the ".env" file (which is generated from the "env_example" template | ||
# file). | ||
|
||
# --- config/blacklight.yml | ||
SOLR_URL=http://solr-fedora4:8983/solr/fedora4 | ||
|
||
# --- config/environments/*.rb | ||
FCREPO_BASE_URL=http://fcrepo-local:8080/fcrepo/rest | ||
|
||
# --- config/environments/*.rb | ||
# base URL of the IIIF server (which serves the manifests, images, and viewer) | ||
IIIF_BASE_URL=https://iiiflocal/ | ||
|
||
# --- config/environments/*.rb | ||
# version of the Mirador Static Viewer | ||
MIRADOR_STATIC_VERSION=1.3.0 | ||
|
||
# Base URL for retrieving files via download urls. | ||
# This should include the entire URL except for the token | ||
RETRIEVE_BASE_URL=http://archelon-local:3000/retrieve/ | ||
|
||
# The base URL (including a trailing slash) for the handle proxy server | ||
# associated with this application. | ||
# For example: "https://hdl-test.lib.umd.edu/" | ||
HANDLE_HTTP_PROXY_BASE=http://hdl-local/ | ||
|
||
# --- config/ldap.yml | ||
LDAP_HOST=directory.umd.edu | ||
LDAP_PORT=636 | ||
LDAP_BIND_DN=uid=libr-fedora,cn=auth,ou=ldap,dc=umd,dc=edu | ||
|
||
# --- config/stomp.yml | ||
# STOMP_HOST=localhost | ||
STOMP_HOST=activemq | ||
STOMP_PORT=61613 | ||
|
||
# Used by the STOMP listener to generate the URL of the Archelon web application | ||
# for triggering updates to import/export job status | ||
# Should be the root URL of the Archelon Rails application. For example, for | ||
# local development: http://archelon-local:3000/ | ||
ARCHELON_URL=http://archelon-local:3000/ | ||
|
||
# --- config/audit_database.yml | ||
AUDIT_DATABASE_NAME=fcrepo_audit | ||
AUDIT_DATABASE_HOST=localhost | ||
AUDIT_DATABASE_PORT=5433 | ||
AUDIT_DATABASE_USERNAME=archelon | ||
AUDIT_DATABASE_PASSWORD=archelon | ||
|
||
# basic development mode defaults to SQLite | ||
# this should be overridden in a .env.local | ||
# if a PostgreSQL database is desired | ||
# --- config/database.yml | ||
ARCHELON_DATABASE_ADAPTER=sqlite3 | ||
ARCHELON_DATABASE_NAME=db/development.sqlite3 | ||
ARCHELON_DATABASE_POOL=5 | ||
|
||
# --- config/imports.yml | ||
IMPORT_BINARIES_BASE_LOCATION=zip:../../archelon/imports | ||
|
||
# --- config/initializers/plastron.rb | ||
PLASTRON_REST_BASE_URL=http://docker.for.mac.localhost:5000/ |
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,128 @@ | ||
# Example .env file | ||
# Make a copy of this file named ".env" and fill out the properties | ||
# Note: The .env file should _not_ be checked in to Git! | ||
|
||
# File containing server-specific Rails environment variables. | ||
# Do not check into Git! | ||
|
||
# --- config/blacklight.yml | ||
SOLR_URL=http://localhost:8983/solr/fedora4 | ||
|
||
# --- config/fcrepo.rb | ||
FCREPO_BASE_URL=http://localhost:8080/rest | ||
# JWT auth token with user "archelon" and role "fedoraAdmin" | ||
FCREPO_AUTH_TOKEN= | ||
|
||
# --- config/iiif.rb | ||
# base URL of the IIIF server (which serves the manifests, images, and viewer) | ||
IIIF_BASE_URL=https://iiiflocal/ | ||
# version of the Mirador Static Viewer | ||
MIRADOR_STATIC_VERSION = '1.3.0' | ||
|
||
# Base URL for retrieving files via download urls. | ||
# This should include the entire URL except for the token | ||
RETRIEVE_BASE_URL=http://archelon-local:3000/retrieve/ | ||
|
||
# The base URL (including a trailing slash) for the handle proxy server | ||
# associated with this application. | ||
# For example: "https://hdl-test.lib.umd.edu/" | ||
HANDLE_HTTP_PROXY_BASE= | ||
|
||
# --- config/ldap.yml | ||
# LDAP Authentication Credentials | ||
LDAP_HOST= | ||
LDAP_PORT= | ||
LDAP_BIND_DN= | ||
LDAP_BIND_PASSWORD= | ||
|
||
# fcrepo_audit database connection | ||
AUDIT_DATABASE_NAME=fcrepo_audit | ||
AUDIT_DATABASE_HOST=localhost | ||
AUDIT_DATABASE_PORT=5432 | ||
AUDIT_DATABASE_USERNAME=archelon | ||
AUDIT_DATABASE_PASSWORD=archelon | ||
|
||
# ActiveMQ/Stomp protocol configuration | ||
# This is used to send export jobs and receive notifications | ||
# when an export job is complete | ||
# -- config/stomp.yml | ||
STOMP_HOST= | ||
STOMP_PORT= | ||
|
||
# Used by the STOMP listener to generate the URL of the Archelon web application | ||
# for triggering updates to import/export job status | ||
# Should be the root URL of the Archelon Rails application. For example, for | ||
# local development: http://archelon-local:3000/ | ||
ARCHELON_URL= | ||
|
||
# --- config/database.yml | ||
# (Production only - not needed for local development) | ||
# The type of database | ||
ARCHELON_DATABASE_ADAPTER=postgresql | ||
|
||
# The name of the database | ||
ARCHELON_DATABASE_NAME=archelon | ||
|
||
# The encoding to use | ||
ARCHELON_DATABASE_ENCODING=utf8 | ||
|
||
# The username used to connect to the database | ||
ARCHELON_DATABASE_USERNAME=archelon | ||
|
||
# The password used to connect to the database | ||
ARCHELON_DATABASE_PASSWORD= | ||
|
||
# The host for the database | ||
ARCHELON_DATABASE_HOST= | ||
|
||
# The port for the database | ||
ARCHELON_DATABASE_PORT=5432 | ||
|
||
# Pool size | ||
ARCHELON_DATABASE_POOL=10 | ||
|
||
# --- config/ssl.yml | ||
# Used when retrieving export packages from fcrepo. | ||
# These should point to an SSL client cert that has: | ||
# - read permissions to the /exports container | ||
FCREPO_CLIENT_CERT= | ||
FCREPO_CLIENT_KEY= | ||
|
||
# --- config/vocabularies.yml | ||
# Base URI for the controlled vocabulary terms | ||
VOCAB_LOCAL_AUTHORITY_BASE_URI=http://vocab.lib.umd.edu/ | ||
|
||
# The maximum allowed binaries export download size, in bytes | ||
MAX_ALLOWED_BINARIES_DOWNLOAD_SIZE=53687091200 | ||
|
||
# --- config/application.rb | ||
# Set this if you need to change the default logging level of "info" | ||
# RAILS_LOG_LEVEL=debug | ||
|
||
# Production environment variables | ||
# The following environment variables are typically only set when using | ||
# the application in a "production" environment | ||
|
||
# --- config/environments/*.rb | ||
# Serve static files only if this env var is defined | ||
# RAILS_SERVE_STATIC_FILES=true | ||
|
||
# --- config/secrets.yml | ||
# SECRET_KEY_BASE= | ||
|
||
# --- config/imports.yml | ||
# IMPORT_BINARIES_DIR=/data/imports | ||
# IMPORT_BINARIES_BASE_LOCATION=zip+sftp://plastron@archelondev.lib.umd.edu/imports | ||
|
||
# -- config/exports.yml | ||
# EXPORT_DIR=/data/exports | ||
# EXPORT_BASE_DESTINATION=sftp://plastron@archelondev.lib.umd.edu/exports | ||
|
||
|
||
# --- config/initializers/plastron.rb | ||
# Base URL of the Plastron REST endpoint | ||
PLASTRON_REST_BASE_URL=http://localhost:5000/ | ||
|
||
# Public key from Plastron server for SFTP transfers | ||
# Optional for local development, required for production | ||
PLASTRON_PUBLIC_KEY= |