Phenoflow - Import parsed definitions and make them available for generation as CWL workflows
-
Create a
.env
file in project root -
Generate a local development RSA private key (for JWT signing), generated by
openssl genrsa -out key.pem 2048
, and reference its location (e.g.certs/key.pem
, if the key is generated and stored within (a new folder) certs):
RSA_PRIVATE_KEY_FULL_PATH=
- Add development GitHub credentials:
GHE_ACCESS_TOKEN=
- Create a folder called certs and add a root certificate, named
pf.pem
, to it (certs/pf.pem), enabling communicating with other services. Reference this certificate:
NODE_EXTRA_CA_CERTS=
-
Create a
.env
file in project root (or add to existing development file). -
To this file, add the following, which should be chosen at random:
DEFAULT_PASSWORD=
MYSQL_ROOT_PASSWORD=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=
- Add a deployment RSA private key name, e.g.
key.pem
(openssl genrsa -out key.pem 2048
):
RSA_PRIVATE_KEY=
- Add a path on the target deployment host to the deployment RSA private key (without the key name), e.g.
/home/ubuntu/.certs/
:
HOST_RSA_PRIVATE_KEY_PATH=
- Add production GitHub credentials:
GITHUB_ACCESS_TOKEN=
- Create uploads
- Create a node virtual environment (within a python virtual environment), and activate it:
python -m venv .venv
. .venv/bin/activate
pip install nodeenv
nodeenv .nenv
. .nenv/bin/activate
- Install dependencies:
cat requirements.txt | xargs npm install -g
- Run server:
npm start
- Set up a default user if you wish to run Phenoflow as a private instance.
- Deployment is via Docker. If using remote machine, ensure it is activated:
docker context use [machine-name]
- From the root directory, build container:
docker-compose build
- Run container:
docker-compose up -d
- Run all tests:
npm test
- Run specific test(s), e.g.:
NODE_ENV=test npx mocha -g "basic" --exit
- From the root directory run:
docker-compose -f docker-compose.test.yml build;
docker-compose -f docker-compose.test.yml up;
Tests can also be used to import phenotypes from different data sources.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE.md file for details.