{"id":37130736,"url":"https://github.com/onsdigital/go-launch-a-survey","last_synced_at":"2026-01-14T15:01:47.324Z","repository":{"id":53742518,"uuid":"86865520","full_name":"ONSdigital/go-launch-a-survey","owner":"ONSdigital","description":null,"archived":true,"fork":false,"pushed_at":"2021-03-16T15:29:49.000Z","size":376,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-08-14T10:48:55.474Z","etag":null,"topics":["go","golang","jwe","jws","jwt"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ONSdigital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-31T22:37:36.000Z","updated_at":"2025-05-26T06:01:23.000Z","dependencies_parsed_at":"2022-08-28T10:21:05.320Z","dependency_job_id":null,"html_url":"https://github.com/ONSdigital/go-launch-a-survey","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ONSdigital/go-launch-a-survey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fgo-launch-a-survey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fgo-launch-a-survey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fgo-launch-a-survey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fgo-launch-a-survey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ONSdigital","download_url":"https://codeload.github.com/ONSdigital/go-launch-a-survey/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fgo-launch-a-survey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","jwe","jws","jwt"],"created_at":"2026-01-14T15:01:46.605Z","updated_at":"2026-01-14T15:01:47.291Z","avatar_url":"https://github.com/ONSdigital.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alpha: Go Launch a Survey!\n\n### Building and Running\n\nInstall Go and ensure that your `GOPATH` env variable is set (usually it's `~/go`).\n\nNote this app uses govendor (https://github.com/kardianos/govendor) to manage its dependencies.\n\n```\ngo get -d github.com/ONSdigital/go-launch-a-survey/\ncd $GOPATH/src/github.com/ONSdigital/go-launch-a-survey/\ngo get -u github.com/golang/dep/cmd/dep\n$GOPATH/bin/dep ensure\ngo build\n./go-launch-a-survey\n\ngo run launch.go (Does both the build and run cmd above)\n\n```\n\nOpen http://localhost:8000/\n\n### Docker\n\nThe dockerfile is a multistage dockerfile which can be built using:\n\n```\ndocker build -t go-launch-a-survey:latest .\n```\n\nYou can then run the image using `SURVEY_RUNNER_SCHEMA_URL` to point it at an instance of survey runner.\n\n```\ndocker run -e SURVEY_RUNNER_SCHEMA_URL=http://localhost:5000 -it -p 8000:8000 go-launch-a-survey:latest\n```\n\nThe syntax for this will be slightly different on Mac\n\n```\ndocker run -e SURVEY_RUNNER_SCHEMA_URL=http://docker.for.mac.host.internal:5000 -it -p 8000:8000 go-launch-a-survey:latest\n```\n\nYou should then be able to access go launcher at `localhost:8000`\n\nYou can also run a Survey Register for launcher to load Schemas from\n\n```\ndocker run -it -p 8080:8080 onsdigital/eq-survey-register:simple-rest-api\n```\n\n### Run Quick-Launch\n\nFor this to work ensure the JSON you are passing has an eq_id and form_type.\nRun Survey Launcher\n\n```\nscripts/run_app.sh\n```\n\nNow run Go launcher and navigate to \"http://localhost:8000/quick-launch?url=\" passing the url of the JSON\n\n```\ne.g.\"http://localhost:8000/quick-launch?url=http://localhost:7777/1_0001.json\"\n```\n\n### Deployment with [Helm](https://helm.sh/)\n\nTo deploy this application with helm, you must have a kubernetes cluster already running and be logged into the cluster.\n\nLog in to the cluster using:\n\n```\ngcloud container clusters get-credentials survey-runner --region \u003cregion\u003e --project \u003cgcp_project_id\u003e\n```\n\nYou need to have Helm installed locally\n\n1. Install Helm with `brew install kubernetes-helm` and then run `helm init --client-only`\n\n1. Install Helm Tiller plugin for tillerless deploys `helm plugin install https://github.com/rimusz/helm-tiller`\n\nTo deploy to a cluster you can run the following command\n\n```\n./k8s/deploy_app.sh \u003cRUNNER_URL\u003e \u003cDOCKER_REGISTRY\u003e \u003cIMAGE_TAG\u003e\n```\n\n##### Example\n\n```\n./k8s/deploy_app.sh https://example.com  eu.gcr.io/census-eq-dev v1.0.0\n```\n\n### Tests\n\nTo run the unit tests, pass `go test ./... -cover -v` into the command line.\n\n### Notes\n\n- JWT spec based on http://ons-schema-definitions.readthedocs.io/en/latest/jwt_profile.html\n\n### Settings\n\n| Environment Variable           | Meaning                                                      | Default                                                                |\n| ------------------------------ | ------------------------------------------------------------ | ---------------------------------------------------------------------- |\n| GO_LAUNCH_A_SURVEY_LISTEN_HOST | Host address to listen on                                    | 0.0.0.0                                                                |\n| GO_LAUNCH_A_SURVEY_LISTEN_PORT | Host port to listen on                                       | 8000                                                                   |\n| SURVEY_RUNNER_URL              | URL of Survey Runner to re-direct to when launching a survey | http://localhost:5000                                                  |\n| SURVEY_REGISTER_URL            | URL of eq-survey-register to load schema list from           | http://localhost:8080                                                  |\n| JWT_ENCRYPTION_KEY_PATH        | Path to the JWT Encryption Key (PEM format)                  | jwt-test-keys/sdc-user-authentication-encryption-sr-public-key.pem     |\n| JWT_SIGNING_KEY_PATH           | Path to the JWT Signing Key (PEM format)                     | jwt-test-keys/sdc-user-authentication-signing-launcher-private-key.pem |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fgo-launch-a-survey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonsdigital%2Fgo-launch-a-survey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fgo-launch-a-survey/lists"}