Skip to content

Latest commit

 

History

History
71 lines (42 loc) · 3.78 KB

README_DLUHC.md

File metadata and controls

71 lines (42 loc) · 3.78 KB

DLUHC Fork of Digital Form Builder

This respository contains the DLUHC Fork of the XGovFormBuilder.

General information for working with the form builder in DLUHC and getting your local workspace setup can be found here

Builds and Deploys

Information on how the form-runner is built and deploy to AWS is contained here.

Using a new version of the DLUHC fork

Github build

Any push to any branch will build a docker image of the runner and tag it with the commit ID. On main, it will also tag with latest.

So to consume a docker image produced by this workflow, update the Dockerfile you are using to pull the tag produced by this workflow.

Docker Compose

The form runner is part of the fsd docker runner, so just build and run the form-runner through docker compose

docker compose build form-runner
docker compose up form-runner

Workflow Files

More detail on the workflow for deploying form runner to AWS is available here

.github/workflows/main--lint-unit-build-and-publish-images.yml

Disabled This is the workflow used on the main branch of the original XGovFormBuilder repo. It does not apply to our workflow.

.github/workflows/branch--lint-unit-and-smoke-test.yml

Runs against a branch that has an open pull request against it. It will execute on every push to such a branch to build and run smoke tests. Unchanged from upstream repo.

./github/workflows/increment-version.yml

  • Triggered when a PR is opened (or re-opened)
  • Finds the latest tag in the repo, increments the patch version of this, then updates version with that new version
  • eg. If the latest tag is 1.2.3, version will be updated to VERSION=1.2.4
  • This version is then used to tag the built image, as explained above and here

./github/workflows/copilot_deploy.yml

  • Deploys the form runner to AWS as per this wiki page
  • Uses the FSD Dockerfile to create a deployable docker image, then pushes this to AWS.

IDE Setup

pre-commit

Copilot Initialisation

Copilot is the deployment of the infrastructure configuration, which is all stored under the copilot folder. The manifest files have been pre-generated by running through various initialisation steps that create the manifest files by prompting a series of questions, but do not deploy the infrastructure.

For each AWS account, these commands will need to be run once to initialise the environment:

copilot app init pre-award - this links the pre-award app with the current service, and associates the next commands with the service. Essentially, this provides context for the service to run under

copilot init \
    --name fsd-form-runner \
    --app pre-award \
    --type 'Load Balanced Web Service' \
    --image "ghcr.io/${{github.repository_owner}}"/runner \
    --port 80

This will initalise this service, using the current created image