Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In DSpace 7.2 and above, the Configuration format is now YAML and is located at ./config/config.*.yaml.

In DSpace 7.1 and 7.0, the Configuration format was a Typescript file and was located at ./src/environments/environment.*.ts.  The structure of this file was essentially a JSON like format.

If you are upgrading from 7.0 or 7.1 to 7.2 (or later), you will either need to migrate your old configuration file (from Typescript to YAML) or start fresh.  You can migrate your old (7.0 or 7.1) "environment.*.ts" configuration file to the new "config.*.yml" format by doing the following:(see below).

Migrate environment file to YAML

  1. First, you will need to make minor modifications to the old "environment.*.ts" configuration files to ensure it no longer imports any other files:

    Code Block
    titleReplace all imports in environment.*.ts
    // (1) FIRST, you must comment out or remove all 4 imports at the top of the file. For example:
    
    //import { GlobalConfig } from '../config/global-config.interface';
    //import { NotificationAnimationsType } from '../app/shared/notifications/models/notification-animations-type';
    //import { BrowseByType } from '../app/browse-by/browse-by-switcher/browse-by-decorator';
    //import { RestRequestMethod } from '../app/core/data/rest-request-method';
    
    // (2) SECOND, replace those 4 imported objects with these 4 objects. 
    // Paste this code at the top of the file where those imports were.
    
    interface GlobalConfig { }
    
    enum NotificationAnimationsType {
        Fade = 'fade',
        FromTop = 'fromTop',
        FromRight = 'fromRight',
        FromBottom = 'fromBottom',
        FromLeft = 'fromLeft',
        Rotate = 'rotate',
        Scale = 'scale'
    }
    
    enum BrowseByType {
        Title = 'title',
        Metadata = 'metadata',
        Date = 'date'
    }
    
    enum RestRequestMethod {
        GET = 'GET',
        POST = 'POST',
        PUT = 'PUT',
        DELETE = 'DELETE',
        OPTIONS = 'OPTIONS',
        HEAD = 'HEAD',
        PATCH = 'PATCH'
    }


  2. Now, you are ready to run the "yarn env:yaml" command to transform this old configuration into the new format.  

    Code Block
    titleMigrate from environment.\*.ts to config.\*.yml
    yarn env:yaml [relative-path-to-environment.ts] [optional-relative-path-to-YAML]  
    
    # For example, from the 7.2 (or above) root directory, run this:
    # yarn env:yaml relative/path/to/old/environment.prod.ts config/config.prod.yml
    
    # Afterwards, the 


  3. Finally, the old environment.prod*.ts config file can be deleted. It is not used in 7.2 or above.

...

  1. .

Configuration Override

In 7.2 or above

...