Giter Club home page Giter Club logo

eq-questionnaire-launcher's Introduction

EQ Launcher

This project was copied from https://github.com/ONSdigital/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
./eq-questionnaire-launcher

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

Open http://localhost:8000/

Docker

The dockerfile is a multistage dockerfile which can be built using:

docker build -t 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 onsdigital/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 onsdigital/eq-questionnaire-launcher:latest

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

You can also run a Survey Register for launcher to load Schemas from

docker run -it -p 8080:8080 onsdigital/eq-survey-register:simple-rest-api

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 "http://localhost:8000/quick-launch?url=" passing the url of the JSON

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

Notes

Settings

Environment Variable Meaning Default
GO_LAUNCH_A_SURVEY_LISTEN_HOST Host address to listen on 0.0.0.0
GO_LAUNCH_A_SURVEY_LISTEN_PORT Host port to listen on 8000
SURVEY_RUNNER_URL URL of Survey Runner to re-direct to when launching a survey http://localhost:5000
SURVEY_REGISTER_URL URL of eq-survey-register to load schema list from http://localhost:8080
JWT_ENCRYPTION_KEY_PATH Path to the JWT Encryption Key (PEM format) jwt-test-keys/sdc-user-authentication-encryption-sr-public-key.pem
JWT_SIGNING_KEY_PATH Path to the JWT Signing Key (PEM format) jwt-test-keys/sdc-user-authentication-signing-launcher-private-key.pem

eq-questionnaire-launcher's People

Contributors

jonnyshaw89 avatar dwyeradam avatar mebinabraham avatar shahi645 avatar jamesgardiner avatar collisdigital avatar ajmaddaford avatar mislam92 avatar bitdivision avatar kierenbeckett avatar nealedj avatar yoganandkunche avatar insacuri avatar petechd avatar pricem14pc avatar samiwel avatar adoublebarrel avatar benhowes avatar davecharles avatar iwootten avatar bameyrick avatar jamesnunn avatar berroar avatar ljbabbage avatar bambrp avatar warrenbailey avatar wickynilliams avatar berianjones avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.