- 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.example
to.env
- in
frontend/src/environments/environment.ts
set the env vars for development:- set
production
tofalse
- set
baseUrl
tohttp://localhost:5004
- set
apiKey
toDUMMY
- set
fileSizeLimit
to the file size limit
- set
./dc_script.sh
- 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-only
orsudo ./dc_script.sh --backend-only
- Pull this repo
cd PROP
- Ensure the
.env
file in the root directory contains the following variables:PRODUCTION=true
BASE_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 frontend
npm install
- Build production version
- non-prop environments:
npm run build:prod
- prop environment:
npm run build:prod:prop
- non-prop environments:
- Host the resulting
/docs
folder on a hosting platform
- Pull this repo
aws sso login --profile [PROFILE]
(if not already logged in)- In the
.env
file:- set
AWS_ACCOUNT_ID
andAWS_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
docs
folder created during the build process on a hosting platform
Pre-requisites:
- make sure that the VPC endpoints
ecr.dkr
,ecr.api
andaws_ec2_instance_connect_endpoint
are 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.yml
to the instance - ensure the
.env
file is present and contains the following variables:AWS_ACCOUNT_ID
AWS_REGION
BACKEND_APIKEY
MAFFT_ARRAY_COUNT
MAFFT_ARRAY_LENGTH
CLUSTALW_ARRAY_COUNT
CLUSTALW_ARRAY_LENGTH
NO_ALIGNMENT_ARRAY_COUNT
NO_ALIGNMENT_ARRAY_LENGTH
FILE_SIZE_LIMIT
aws ecr get-login-password | docker login --username AWS --password-stdin 151247720829.dkr.ecr.ap-northeast-1.amazonaws.com
docker 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.