Skip to content

govuk-one-login/orchestration-frontend

Repository files navigation

orchestration-frontend

Requirements

You will need the AWS CLI. You can install it via:

brew install awscli

Deployment is done via AWS SAM. You can install it via:

brew install aws-sam-cli --build-from-source

Running the app

Set the environment variables

Create a copy of the .env.sample file and rename it .env

Set the analytics environment variables

Add environment variables to your .env file:

UNIVERSAL_ANALYTICS_GTM_CONTAINER_ID="GTM-XXXXXXX" GOOGLE_ANALYTICS_4_GTM_CONTAINER_ID="GTM-XXXXXXX" GA4_DISABLED="false" UA_DISABLED="true" ANALYTICS_COOKIE_DOMAIN="localhost"

Running in Docker

You can run the app in Docker using:

./startup.sh

Running app locally:

Please ensure you are using the correct node version locally (Found in Dockerfile)

Build

To build the app

npm install && npm run build

Start

To start the app

npm run build && npm run start

Deploying to Dev

Push your code to GitHub, and run the Deploy dev workflow. This should deploy your code to the dev environment.

Formatting & Linting

Scripts:

To check:

npm run check; # Check all
npm run check:pretty; # Check prettier
npm run check:lint; # Check linting

To fix formatting/linting:

npm run fix; # Fix all
npm run fix:pretty; # Fix prettier
npm run fix:lint; # Fix linting

To setup pre-commit hook

npm run prepare

GitHub Secrets:

Deployment relies on several secrets stored in GitHub:

Secret Description
ARTIFACT_BUCKET_NAME This is the bucket that the SAM template will be pushed to.
ECR_REGISTRY This is the address of the ECR registry.
GH_ACTIONS_ROLE_ARN This is the role GitHub actions assumes with permission to push to the artifact bucket (defined by the previsioning pipeline).
SAM_APP_VALIDATE_ROLE_ARN This is the role GitHub actions assumes with permission to validate the SAM template (defined by the previsioning pipeline).
SONAR_TOKEN This is used to trigger SonarCloud.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10