Prerequisites and Software Dependencies

Information on prerequisites and software dependencies needed to run this system.

Details

This system runs as a docker image connecting to an attached database (which can also be a cloud-configured database, such as AWS RDS). Installation requirements include:

  • Linux OS (specifically tested on Ubuntu 18.04, also specifically tested on Windows 10)

  • Docker

  • Postgres database with 10GB storage

    • Version 14.x by default, but can be built with later versions if specified

    • Make sure to create a database that includes WITH encoding ‘UTF-8’

  • File system (to house indexes) with 10GB space (to download and unpack files)

  • The browser application has been tested on Chrome and Firefox.

Other Considerations

To deploy the system to a non localhost environment, you’ll need a DNS entry mapping to the server hosting the software.

You’ll likely also want to run Apache or Nginx to route traffic to the underlying server.

To run the system under HTTPS, you’ll also want to install SSL certificates and configure Apache/Nginx appropriately.

Following is a sample Nginx configuration for a server called termserver.westcoastinformatics.com to inspire you:

server { server_name termserver.westcoastinformatics.com; location /terminology { proxy_pass http://127.0.0.1:8082$request_uri; proxy_read_timeout 300; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto "https"; proxy_set_header X-Url-Scheme $scheme; proxy_redirect off; } location /terminology-ui { proxy_pass http://127.0.0.1:8082$request_uri; proxy_read_timeout 300; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto "https"; proxy_set_header X-Url-Scheme $scheme; proxy_redirect off; } listen [::]:443 ssl ipv6only=on; # managed by Certbot listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/termserver.westcoastinformatics.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/termserver.westcoastinformatics.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot access_log /var/log/nginx/access.log error_log /var/log/nginx/error.log } server { if ($host = termserver.westcoastinformatics.com) { return 301 https://$host$request_uri; } listen 80 ; listen [::]:80 ; server_name termserver.westcoastinformatics.com; }

 

Creating and loading Postgres using Docker

Here is a sample of using postgres docker image to load and restore the data.

# Make a directory for the postgres data (this is where the persistent # database files will live after the database is created and loaded pgDataDir=/tmp/pgdatamkdir $pgDataDir # Download your dump file and  dumpDir=/tmp/data wget -o $dumpDir/data.dump  https://wci-us-west-2.s3-us-west-2.amazonaws.com/term-server-v2/data/wci-terminology-db-<your data>.dump # Run the docker image (-d puts it in the background) # by default it uses "posgres" for the user and the database name docker run --rm --name pg-docker -v $pgDataDir:/var/lib/postgresql/data -v $dumpDir:/data -e POSTGRES_PASSWORD=rootpwd -d postgres:9.6.16 # Log into the docker image and run pg_restore docker exec -it pg-docker /bin/sh # psql -Upostgres Type "help" for help. postgres=# create database terminologydb with encoding 'UTF-8'; postgres=# \q  # pg_restore -O -n public -Fc -d terminologydb -U postgres /data/data.dump  ... this will take a few minutes to complete ... # quit