Contribute to the DSpace Development Fund

The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

As the DSpace 7 User Interface is built on Angular.io, it aligns with many of the best practices of that platform & the surrounding community.  One example is that Configuration files (along with much of the UI code) use the TypeScript language.  That said, you do NOT need to be deeply familiar with TypeScript to edit the configuration files. Much of the syntax is very similar to JSON, which is a common configuration format.

You must rebuild after any configuration change

At this time, you must rebuild the UI anytime you modify a configuration setting.  This is because the currently active configuration is in your ./src/environments/environment.ts which is the compiled/deduped version of your configuration after applying all overrides.

Configuration Override

The UI configuration files reside in the ./src/environments/ folder in the Angular UI source code.

To change the default configuration values, you simply create (one or more) local files that override the parameters you need to modify. You can use environment.template.ts as a starting point.

  • For example, create a new environment.dev.ts file in src/environments/ for a development environment;
  • For example, create a new environment.prod.ts file in src/environments/ for a production environment;

The "ui" and "rest" sections of the configuration may also be overridden separately via one of the following

  • By setting any of the following environment variables in your system:

    # "ui" settings environment variables
    DSPACE_HOST # The host name of the angular application
    DSPACE_PORT # The port number of the angular application
    DSPACE_NAMESPACE # The namespace of the angular application
    DSPACE_SSL # Whether the angular application uses SSL [true/false]
    
    # "rest" settings environment variables
    DSPACE_REST_HOST # The host name of the REST application
    DSPACE_REST_PORT # The port number of the REST application
    DSPACE_REST_NAMESPACE # The namespace of the REST application
    DSPACE_REST_SSL # Whether the angular REST uses SSL [true/false]
  • Or, by creating a .env (environment) file in the project root directory and setting the environment variables in that location.

The override priority ordering is as follows (with items listed at the top overriding all other settings)

  1. Environment variables
  2. The ".env" file
  3. The "environment.prod.ts", "environment.dev.ts" or "environment.test.ts"
  4. The "environment.common.ts"

Configuration Reference

  • No labels