EQ Launcher

September 21, 2026 ยท View on GitHub

This project was copied from go-launch-a-survey and should be used for v3 of runner.

Building and Running

Install Go and ensure that your GOPATH env variable is set (usually it's ~/go).

go get
go build
./census31-eq-questionnaire-launcher

go run launch.go (Does both the build and run cmd above)

Open http://localhost:8000/

Docker

The Docker image can be built using the following command, providing the required target platform architecture as required

docker buildx build --platform [ linux/amd64 | linux/arm64 ] --no-cache -t census31-eq-questionnaire-launcher:latest .

You can then run the image using SURVEY_RUNNER_SCHEMA_URL to point it at an instance of survey runner.

docker run -e SURVEY_RUNNER_SCHEMA_URL=http://localhost:5000 -it -p 8000:8000 census31-eq-questionnaire-launcher:latest

The syntax for this will be slightly different on Mac

docker run -e SURVEY_RUNNER_SCHEMA_URL=http://host.docker.internal:5000 -it -p 8000:8000 census31-eq-questionnaire-launcher:latest

You should then be able to access go launcher at localhost:8000

Run Quick-Launch

If the schema specifies a schema_name field, that will be used as the schema_name claim. If not, the filename from the URL (before .) will be used.

Run Questionnaire Launcher

scripts/run_app.sh

Now run Go launcher and navigate to "localhost:8000/quick-launch?schema_url=" passing the url of the JSON

e.g."http://localhost:8000/quick-launch?schema_url=http://localhost:7777/1_0001.json"

The optional query parameter version can be added to the quick launch url which allows for the launch payload structure to be specified. If the parameter is not set then the default launch payload structure v2 will be used. Documentation on the v2 structure is in ons-schema-definitions

e.g."http://localhost:8000/quick-launch?schema_url=http://localhost:7777/1_0001.json&version=v1"

Commands for Formatting & Linting

We use Megalinter to maintain our code by running various linters over the different file types we have. This is run against PRs using the mega-linter GitHub action but can also be run locally. To run the linter locally you can run:

make megalint

This command will run all the linters enabled in the mega-linter.yml config file in the root of the repo against the all the files in the repo and report back any issues. This is run via docker and may take some time to run first time. We also have another command which will also run Megalinter locally but this one will attempt to fix any issues it can rather than just report them.

make megalint-apply

Its also possible to just run the golang linting locally, to run this you will need to have golangci-lint installed.

To install with Homebrew run:

brew install golangci-lint

To install with Conda run:

conda install conda-forge::golangci-lint

To lint the go files run:

make lint-go

This will run golangci-lint which is also configured to run revive, the config for this will also be in the golangci.yml

To format the go files run:

make format-go

Design System

To update the design system version, you need to update the version within the CDN link, they are present in both template files (layout and launch)

Notes

Settings

Environment VariableMeaningDefault
GO_LAUNCH_A_SURVEY_LISTEN_HOSTHost address to listen on0.0.0.0
GO_LAUNCH_A_SURVEY_LISTEN_PORTHost port to listen on8000
SURVEY_RUNNER_URLURL of Questionnaire Runner to re-direct to when launching a surveyhttp://localhost:5000
SURVEY_REGISTER_URLURL of eq-survey-register to load schema list fromhttp://localhost:8080
JWT_ENCRYPTION_KEY_PATHPath to the JWT Encryption Key (PEM format)jwt-test-keys/sdc-user-authentication-encryption-sr-public-key.pem
JWT_SIGNING_KEY_PATHPath to the JWT Signing Key (PEM format)jwt-test-keys/sdc-user-authentication-signing-launcher-private-key.pem