2021 Developer Startup Guide (WIP) - clinwiki-org/clinwiki Wiki

Quickstart

Back Up DB instructions

(docker needs to be running to connect to clinwiki-db container)

Run move seed file into docker container : Docker cp <file> clinwiki-db:/ restore seed database sql file to docker postgres instance docker exec -it clinwiki-db psql -U clinwiki -d clinwiki -f <file>

IMPORT hasura_metadata file in local hasura console. (latest hasura meta file in repo at ___ , may need to modify connection string in file)

(need to still solidify which db is backup, which metadata will correctly match relationships and schema)

Helpful commands for reindexing using old (but working mappings locally)

Either

1a. Uncomment out clinwiki container and then docker-compose build

or 1b. Switch to Master and add ‘gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: '01f92d86d15d85cfd0f20dabd025dcbd36a8a60f’’ to end of GEMFILE (we should probably create a reindexing branch and commit this, if we plan on using old mapping prior to next elastic version, it's a pain in the ass, but it's this or maybe throwing a few hours at fighting with new mapping created by elastic) 2. Docker exec -it rails c 3. Study.reindex 4.. Switch back to develop or your local branch and re run docker-compose build (this is the unfortunatel part of this process and then proceed normally)

or 1c. load mapping file (in repo _____) with command, easy from kibana development tab

For backend development

(when you don't want to wait for docker-compose build)

comment out data-pipeline and nodejs containers (in docker-comopose.yml and run data-pipeline and node outside of docker via npm start and npm run start data-pipeline (is this "npm start" for nodejs and "npm start pipeline" for data-pipeline) scripts

docker containers for elastic, kibana, clinwiki-db (for postgres), nginx and