Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(dict-readme): updating readme with data dictionary info #7

Merged
merged 3 commits into from
Aug 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down