diff --git a/README.md b/README.md index 504906b..1442448 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,22 @@ users: privilege: ['create', 'read', 'update', 'delete', 'upload'] ``` -Refer to [Setting up Users](#Setting-Up-Users) to review how to apply the changes made in the `user.yaml` file to the database \ No newline at end of file +Refer to [Setting up Users](#Setting-Up-Users) to review how to apply the changes made in the `user.yaml` file to the database + +### Changing the data dictionary +The data dictionary the commons uses is dictated by the `DICTIONARY_URL` environment variable in both sheepdog and peregrine. The default value for this variable is set to `https://s3.amazonaws.com/dictionary-artifacts/datadictionary/develop/schema.json`, which is the developer test data dictionary. To override this default, edit the `environment` fields in the peregrine sections of the `docker-compose.yml` file. This will change the value of the environment variable in both sheepdog and peregrine. An example, where the `DICTIONARY_URL` environment variable is set to the url of the dev data dictionary, is provided in the docker-compose.yml. Another example is shown below: +``` +peregrine: + image: "quay.io/cdis/peregrine:master" + command: bash /peregrine_setup.sh + . + . + . + environment: &env + DICTIONARY_URL: {YOUR_DICTIONARY_URL_GOES_HERE} + depends_on: + - postgres +``` +In addition to changing the `DICTIONARY_URL` field, it may also be necesary to change the `APP` environment variable in data-portal. This will only be the case if the alternate dictionary deviates too much from the default dev dictionary. + +As this is a change to the Docker Compose configuration, you will need to restart the Docker Compose to apply the changes. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index a39697a..4027294 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,7 +40,8 @@ services: - ./apis_configs/config_helper.py:/var/www/peregrine/config_helper.py - ./temp_creds/service.crt:/usr/local/share/ca-certificates/cdis-ca.crt - ./scripts/peregrine_setup.sh:/peregrine_setup.sh - environment: + environment: &env + DICTIONARY_URL: https://s3.amazonaws.com/dictionary-artifacts/datadictionary/develop/schema.json REQUESTS_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt depends_on: - postgres @@ -54,6 +55,7 @@ services: - ./apis_configs/sheepdog_creds.json:/var/www/sheepdog/creds.json - ./apis_configs/config_helper.py:/var/www/sheepdog/config_helper.py - ./scripts/sheepdog_setup.sh:/sheepdog_setup.sh + environment: *env depends_on: - postgres dataportal: