digital-dream-labs / escape-pod-extension

MIT License
30 stars 29 forks source link

Error after docker-compose #3

Open IanHudson opened 3 years ago

IanHudson commented 3 years ago

After running make build then sudo docker-compose up --build. The output is as below

`Building escape-pod-extension Step 1/3 : FROM scratch ---> Step 2/3 : COPY escapepodextension / ---> Using cache ---> 66301114a1b6 Step 3/3 : ENTRYPOINT ["/escapepodextension"] ---> Using cache ---> 9652e92d7e7e

Successfully built 9652e92d7e7e Successfully tagged go_escape-pod-extension:latest Recreating go_escape-pod-extension_1 ... done Attaching to go_escape-pod-extension_1 escape-pod-extension_1 | {"Function":"main.main","Source":"main.go:75","level":"fatal","msg":"error during server setup: [invalid client-authentication value \"\\"NoClientCert\\"\", valid values [NoClientCert, RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, RequireAndVerifyClientCert]]","time":"2021-03-14 14:20:09"} go_escape-pod-extension_1 exited with code 1

cyb3rdog commented 3 years ago

You have to set up all the environments variables, which are used in there.

Unfortunatelly, it is not well explicitly documented anywhere, so currently you can only read those here. Also in order to properly build you should export them into $BUILDINFO_FLAGS as it is used by the make/go build. This is the bare minimum of what you have to set up, change the CHANGEME values:

DDL_RPC_PORT=8089 DDL_RPC_CLIENT_AUTHENTICATION="NoClientCert" DDL_RPC_INSECURE=true

ESCAPE_POD_WEATHER_API_KEY=CHANGEME ESCAPE_POD_WEATHER_UNITS=CHANGEME ESCAPE_POD_WEATHER_ZIP_CODE=CHANGEME

ESCAPE_POD_ROBOT_TARGET=CHANGEME ESCAPE_POD_ROBOT_TOKEN=CHANGEME

OR... you can give a damn about the env vars, and apply the attached patch file, so it which will allways statically set them up for your build.