- Docker & docker compose
- npm
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -sudo apt install nodejs
- Pull this repo
cd PROP- copy
.env.exampleto.env - in
frontend/src/environments/environment.tsset the env vars for development:- set
productiontofalse - set
baseUrltohttp://localhost:5004 - set
apiKeytoDUMMY - set
fileSizeLimitto the file size limit
- set
- make sure Docker is running
PYTHON=python3.8 ./dc_script.sh- NOTES:
- this script will prune ALL existing Docker volumes, images and containers
- it is necessary to set PYTHON=python3.8 so that the dc_script runs correctly
- NOTES:
- wait for the script to finish
- open the website on
https://localhost:4200/ - make changes to the frontend/backend code. Hot reload is enabled
NOTE:
- If you want to run the frontend/backend separately, you can do so by running
sudo ./dc_script.sh --frontend-onlyorsudo ./dc_script.sh --backend-only
- Pull this repo
cd PROP- Ensure the
.envfile in the root directory contains the following variables:PRODUCTION=trueBASE_URL(set to the API Gateway URL)BACKEND_APIKEY(set to the Python backend API key)FILE_SIZE_LIMIT(set to the desired file size limit)
cd frontendnpm install- Build production version
- non-prop environments:
npm run build:prod - prop environment:
npm run build:prod:prop
- non-prop environments:
- Host the resulting
/docsfolder on a hosting platform
- Pull this repo
aws sso login --profile [PROFILE](if not already logged in)- In the
.envfile:- set
AWS_ACCOUNT_IDandAWS_REGION
- set
cd PROP./build_and_upload_backend_images_production.sh [AWS SSO PROFILE]- wait for the script to finish
NOTE:
- the script builds the Docker images and uploads them to AWS ECR repositories
- access to that repository / AWS account is required
- Host the
docsfolder created during the build process on a hosting platform
Pre-requisites:
- make sure that the VPC endpoints
ecr.dkr,ecr.apiandaws_ec2_instance_connect_endpointare created using the repositoryPROP-infra
- SSH into the EC2 instance via the management console
- access to the EC2 instance / AWS account is required
- copy
compose_deploy.ymlto the instance - ensure the
.envfile is present and contains the following variables:AWS_ACCOUNT_IDAWS_REGIONBACKEND_APIKEYMAFFT_ARRAY_COUNTMAFFT_ARRAY_LENGTHCLUSTALW_ARRAY_COUNTCLUSTALW_ARRAY_LENGTHNO_ALIGNMENT_ARRAY_COUNTNO_ALIGNMENT_ARRAY_LENGTHFILE_SIZE_LIMIT
aws ecr get-login-password | docker login --username AWS --password-stdin 151247720829.dkr.ecr.ap-northeast-1.amazonaws.comdocker compose -f compose_deploy.yml up -d
- array length and count variables can be set in
./.env.fixedVariables- can set:
- MAFFT array length & count
- ClustalW array length & count
- can set:
sudo ./dc_script.sh --frontend-only
sudo ./dc_script.sh --backend-only
- Rebuild:
sudo ./dc_script.sh
-
local environment:
https://localhost:4200/ -
static hosting: domain provided by the hosting platform
This software is released under the MIT License, see LICENSE.txt.