All Versions
DSpace Documentation
...
Using Environment variables. All environment variables MUST (1) be prefixed with "DSPACE_", (2) use underscores as separators (no dots allowed), and (3) use all uppercase. Some examples are below:
| Code Block |
|---|
# "ui" settings environment variables ui.host => DSPACE_UI_HOST # The host name ui.port => DSPACE_UI_PORT # The port number ui.nameSpace => DSPACE_UI_NAMESPACE # The namespace ui.ssl => DSPACE_UI_SSL # Whether the angular application uses SSL [true/false] # "rest" settings environment variables rest.host => DSPACE_REST_HOST # The host name of the REST application rest.port => DSPACE_REST_PORT # The port number of the REST application rest.nameSpace => DSPACE_REST_NAMESPACE # The namespace of the REST application rest.ssl => DSPACE_REST_SSL # Whether the angular REST uses SSL [true/false] # Other examples defaultLanguagefallbackLanguage => DSPACE_DEFAULTLANGUAGEFALLBACKLANGUAGE mediaViewer.video => DSPACE_MEDIAVIEWER_VIDEO # Multi-valued setting examples # If a setting can have multiple values (e.g. theme names), then use an index number (starting with zero) # to specify the multiple values. # The below example is equivalent to: # themes: # - name: 'dspace' # - name: 'mytheme' # handle: '10673/123' DSPACE_THEMES_0_NAME = 'dspace' DSPACE_THEMES_1_NAME = 'mytheme' DSPACE_THEMES_1_HANDLE = '10673/123' |
.env (environment) file in the project root directory and setting the environment variables in that location....
| Code Block | ||||
|---|---|---|---|---|
| ||||
ssr: # Whether to tell Angular to inline "critical" styles into the server-side rendered HTML. # Determining which styles are critical is a relatively expensive operation; this option is # disabled (false) by default to boost server performance at the expense of loading smoothness. inlineCriticalCss: false # Path prefixespatterns to enable*exclude* from SSR for. By default these are limited to paths of primary DSpace objects listed in the DSpace sitemap. # Paths are matched based on whether they "start with" a string in this configuration. Wildcards are not supported, excludes community and collection browse, global browse, # global search, community list, statistics and various administrative tools. # The defined patterns will be run as regexes against the path of the page to check if SSR is allowed. # ToIf the disablepath thismatches feature,any specifyof [ '/' ], as that will result in all paths being enabled for SSR. paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ] the regexes it will be served directly in CSR (client side rendering). # NOTE: This configuration *replaces* the "paths" setting that existed in versions 7.6.3 and 8.1. excludePathPatterns: - pattern: "^/communities/[a-f0-9-]{36}/browse(/.*)?$" flag: "i" - pattern: "^/collections/[a-f0-9-]{36}/browse(/.*)?$" flag: "i" - pattern: "^/browse/" - pattern: "^/search$" - pattern: "^/community-list$" - pattern: "^/admin/" - pattern: "^/processes/?" - pattern: "^/notifications/" - pattern: "^/statistics/?" - pattern: "^/access-control/" - pattern: "^/health$" # Whether to enable rendering of Search component in SSR. # If set to true the component will be included in the HTML returned from the server side rendering. # If set to false the component will not be included in the HTML returned from the server side rendering. enableSearchComponent: false # Whether to enable rendering of Browse component on SSR. # If set to true the component will be included in the HTML returned from the server side rendering. # If set to false the component will not be included in the HTML returned from the server side rendering. enableBrowseComponent: false # Enable state transfer from the server-side application to the client-side application. (Defaults to true) # Note: When using an external application cache layer, it's recommended not to transfer the state to avoid caching it. # Disabling it ensures that dynamic state information is not inadvertently cached, which can improve security and # ensure that users always use the most up-to-date state. transferState: true # When a different REST base URL is used for the server-side application, the generated state contains references to # REST resources with the internal URL configured. By default, these internal URLs are replaced with public URLs. # Disable this setting to avoid URL replacement during SSR. In this the state is not transferred to avoid security issues. replaceRestUrl: true # Enable request performance profiling data collection and printing the results in the server console. # Defaults to false. Enabling in production is NOT recommended enablePerformanceProfiler: false |
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
submission:
autosave:
# NOTE: which metadata trigger an autosave
metadata: []
# NOTE: after how many time (milliseconds) submission is saved automatically
# eg. timer: 300000 # 5 minutes
timer: 0
icons:
metadata:
# NOTE: example of configuration
# # NOTE: metadata name
# - name: dc.author
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
# style: fas fa-user
- name: dc.author
style: fas fa-user
# default configuration
- name: default
style: ''
authority:
confidence:
# NOTE: example of configuration
# # NOTE: confidence value
# - value: 600
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
# style: text-success
# icon: fa-circle-check
# # NOTE: the class configured in property style is used by default, the icon property could be used in component
# configured to use a 'icon mode' display (mainly in edit-item page)
- value: 600
style: text-success
icon: fa-circle-check
- value: 500
style: text-info
icon: fa-gear
- value: 400
style: text-warning
icon: fa-circle-question
- value: 300
style: text-muted
icon: fa-thumbs-down
- value: 200
style: text-muted
icon: fa-circle-exclamation
- value: 100
style: text-muted
icon: fa-circle-stop
- value: 0
style: text-muted
icon: fa-ban
- value: -1
style: text-muted
icon: fa-circle-xmark
# default configuration
- value: default
style: text-muted
icon: fa-circle-xmark |
The "defaultLanguagefallbackLanguage" and "languages" sections allow you to customize which languages to support in your User Interface. See also Multilingual Support.
| Code Block | ||||
|---|---|---|---|---|
| ||||
# Fallback or Defaultdefault Language in which the UI will be rendered if the user's browser language is not an active language # NOTE: in DSpace 7.x-9.1 this was called "defaultLanguage". It was renamed to "fallbackLanguage" in 9.2+ fallbackLanguage: en # Languages. DSpace Angular holds a message catalog for each of the following languages. # When set to active, users will be able to switch to the use of this language in the user interface. # All out of the box language packs may be found in the ./src/assets/i18n/ directory languages: - code: en label: English active: true - code: cs label: Čeština active: true - code: de label: Deutsch active: true - ... |
...
The "geospatialMapViewer" section allows you to enable the display of geospatial maps on item pages, search result views, and as a "browse by" page. These maps are driven by Leaflet.js with the OpenStreetMaps Mapnik tile provider (by default).
Take note of the default field used for geospatial metadata - this may need to be changed to fit your specific repository metadata usage.
| Code Block | ||||
|---|---|---|---|---|
| ||||
# Geospatial Map display options
geospatialMapViewer:
# Which fields to use for parsing as geospatial points in search maps
# (note, the item page field component allows any field(s) to be used
# and is set as an input when declaring the component)
spatialMetadataFields:
- 'dcterms.spatial'
# Which discovery configuration to use for 'geospatial search', used
# in the browse map
spatialFacetDiscoveryConfiguration: 'geospatial'
# Which filter / facet name to use for faceted geospatial search
# used in the browse map
spatialPointFilterName: 'point'
# Whether item page geospatial metadata should be displayed
# (assumes they are wrapped in a test for this config in the template as
# per the default templates supplied with DSpace for untyped-item and publication)
enableItemPageFields: false
# Whether the browse map should be enabled and included in the browse menu
enableBrowseMap: false
# Whether a 'map view' mode should be included alongside list and grid views
# in search result pages
enableSearchViewMode: false
# The tile provider(s) to use for the map tiles drawn in the leaflet maps.
# (see https://leaflet-extras.github.io/leaflet-providers/preview/) for a full list
tileProviders:
- 'OpenStreetMap.Mapnik'
# Starting centre point for the map, as lat and lng coordinates. This is useful
# to set the centre of the map when the map is first loaded and if there are no
# points, shapes or markers to display.
# Defaults to the centre of Istanbul
defaultCentrePoint:
lat: 41.015137
lng: 28.979530 |
Additional information about this feature can be found at https://github.com/kshepherd/dspace-geospatial-maps-doc/blob/main/README.md
The "debug" property allows you to turn on debugging in the Angular UI. When enabled, your environment and all Redux actions/transfers are logged to the console. This is only ever needed if you are debugging a tricky issue.
...