# Local postgres on docker # setting up np_annot_uat 1. Run postgres on docker with volume mount ``` docker run -d --name nextprot-postgres -e POSTGRES_PASSWORD=postgres -e PDGATA=/var/lib/postgresql/data/pgdata -v /scratch/data/neXtProt/npdata/database/:/var/lib/postgresql/data -p 5432:5432 postgres ``` 2. Restore the np_annot_uat database with pg_restore (on docker again, as it is not locally installed) ``` docker run -it -v /scratch/data/neXtProt/npdata/:/data postgres:latest /bin/bash pg_restore -h 192.168.1.3 -p 5432 -Upostgres --dbname np_annot_uat --schema nextprot -Fc /data/web-uat_20220218-cactus.isb-sib.ch.dump.gz ``` # PIG databases ## Glyconnect ``` docker run -it -v /scratch/data/PIG/glyconnect/data/:/data postgres:latest psql -h 10.195.69.60 -U postgres -f /data/glyconnect.sql ``` *Don't need docker if you have postgres locally* ## Run glyconnect API locally Repo is at `git@bitbucket.org:sib-pig/glyconnect-api.git` - `git clone git@bitbucket.org:sib-pig/glyconnect-api.git` Install [play framework](https://www.playframework.com/documentation/2.3.x/Installing) - Install activator - `export ACTIVATOR_VERSION=1.3.12` - `wget https://downloads.typesafe.com/typesafe-activator/${ACTIVATOR_VERSION}/typesafe-activator-${ACTIVATOR_VERSION}.zip` - add the activator to the classpath` - Add an env variable `export TERM=xterm-color`(This seems to be a known issue and a fix) - Start the activator `activator` - Run the project on activator terminal with `run` -