eResearch QUT Transcription Service
This application is monorepo using a pnpm workspace.
pnpm build
pnpm install
pnpm test
- Copy the dev environment variables into your local
.env.local
cd frontend
export STACK_NAME=dev-transcription
aws cloudformation describe-stacks --stack-name $STACK_NAME --query "Stacks[0].Outputs[?OutputKey=='FrontEndEnvironment'].OutputValue" --output text > .env.local
- Modify
.env.local
to redirect to the local app after login:
NEXT_PUBLIC_AUTH_SIGN_IN_REDIRECT=http://localhost:3000/
- Start the app
pnpm dev
pnpm --filter frontend lint
pnpm --filter frontend fmt
cd api
pnpm --filter transcription-api lint
pnpm --filter transcription-api fmt
Ignore formatting revisions in .git-blame-ignore-revs
:
git config blame.ignoreRevsFile .git-blame-ignore-revs
cd api
npm install
cd frontend
pnpm install
mkdir -p out
cd deployment
npm install
export GITHUB_REF_NAME=dev
export GITHUB_FILTERS="environment:dev"
cdk deploy TranscriptionGitHubStack
cdk deploy TranscriptionFrontEndGitHubStack
~/.aws/config
:
[profile qut-dev]
region = ap-southeast-2
[profile qut-dev-github]
role_arn = <TranscriptionGitHubStack.deployRoleArn>
source_profile = qut-dev
region = ap-southeast-2
[profile qut-dev-github-frontend]
role_arn = <TranscriptionFrontEndGitHubStack.deployRoleArn>
source_profile = qut-dev
region = ap-southeast-2
Deploy the stacks with the GitHub role:
AWS_PROFILE=qut-dev-github cdk deploy TranscriptionStack
AWS_PROFILE=qut-dev-github-frontend cdk deploy TranscriptionFrontEndStack
Also builds the lambda functions
cdk deploy TranscriptionStack
export STACK_NAME=dev-transcription
aws cloudformation describe-stacks --stack-name $STACK_NAME --query "Stacks[0].Outputs[?OutputKey=='FrontEndEnvironment'].OutputValue" --output text > ../frontend/.env.production
From the top-level frontend
directory:
pnpm build
cdk deploy FrontEndStack