From f2b572946a4dd600fcf822b45eca0abb1fb7b84e Mon Sep 17 00:00:00 2001 From: Kevin F Date: Thu, 8 Sep 2022 13:35:17 -0500 Subject: [PATCH] Added definition and explanation of environment variables (just http bind settings so far) --- EnvironmentVariables.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 EnvironmentVariables.md diff --git a/EnvironmentVariables.md b/EnvironmentVariables.md new file mode 100644 index 0000000..b84206d --- /dev/null +++ b/EnvironmentVariables.md @@ -0,0 +1,28 @@ +# GoSmartKeyboard Environment Variables + +## HTTP Bind Settings + + +GoSmartKeyboard supports both standard TCP sockets and unix sockets for the +HTTP server. + +First, we check for a unix socket path. + +One should prefer a unix socket if their reverse proxy supports it and is on the +same machine. + +--- unixSocketPath +unixSocketPath, unixSocketPathExists := os.LookupEnv("KEYBOARD_UNIX_SOCKET_PATH") +--- + +If the unix socket path is set, we use it. Otherwise, we use the TCP socket. + +The TCP socket is configured by the following environment variables: + +--- TCPBindAddress +tcpBindAddress, tcpBindAddressExists := os.LookupEnv("KEYBOARD_TCP_BIND_ADDRESS") +--- + +--- TCPBindPort +tcpBindPort, tcpBindPortExists := os.LookupEnv("KEYBOARD_TCP_BIND_PORT") +---