Fixes #18: Update documentation

This commit is contained in:
Lou Knauer 2022-07-08 11:01:51 +02:00
parent d7d278037e
commit f2f54bec4b
3 changed files with 6 additions and 3 deletions

View File

@ -32,7 +32,7 @@ You need `wget`, `go`, and `yarn` in your path to start the demo. The demo will
```sh ```sh
git clone git@github.com:ClusterCockpit/cc-backend.git git clone git@github.com:ClusterCockpit/cc-backend.git
cd ./cc-backend
./startDemo.sh ./startDemo.sh
``` ```
You can access the web interface at http://localhost:8080. You can access the web interface at http://localhost:8080.
@ -88,6 +88,7 @@ Having no jobs in the job-archive at all is fine.
### Configuration ### Configuration
A config file in the JSON format can be provided using `--config` to override the defaults. A config file in the JSON format can be provided using `--config` to override the defaults.
By default, if there is a `config.json` file in the current directory of the `cc-backend` process, it will be loaded even without the `--config` flag.
You find documentation of all supported configuration and command line options [here](./configs.README.md). You find documentation of all supported configuration and command line options [here](./configs.README.md).
### Update GraphQL schema ### Update GraphQL schema

View File

@ -6,6 +6,7 @@ config file location using the command line option `--config <filepath>`.
All security relevant configuration. e.g., keys and passwords, are set using environment variables. It is supported to specify these by means of an `.env` file located in the project root. All security relevant configuration. e.g., keys and passwords, are set using environment variables. It is supported to specify these by means of an `.env` file located in the project root.
## Configuration Options ## Configuration Options
* `addr`: Type string. Address where the http (or https) server will listen on (for example: 'localhost:80'). Default `:8080`. * `addr`: Type string. Address where the http (or https) server will listen on (for example: 'localhost:80'). Default `:8080`.
* `user`: Type string. Drop root permissions once .env was read and the port was taken. Only applicable if using privileged port. * `user`: Type string. Drop root permissions once .env was read and the port was taken. Only applicable if using privileged port.
* `group`: Type string. Drop root permissions once .env was read and the port was taken. Only applicable if using privileged port. * `group`: Type string. Drop root permissions once .env was read and the port was taken. Only applicable if using privileged port.
@ -52,6 +53,7 @@ All security relevant configuration. e.g., keys and passwords, are set using env
An example env file is found in this directory. Copy it to `.env` in the project root and adapt it for your needs. An example env file is found in this directory. Copy it to `.env` in the project root and adapt it for your needs.
* `JWT_PUBLIC_KEY` and `JWT_PRIVATE_KEY`: Base64 encoded Ed25519 keys used for JSON Web Token (JWT) authentication . TODO: Details! You can generate your own keypair using `go run utils/gen-keypair.go` * `JWT_PUBLIC_KEY` and `JWT_PRIVATE_KEY`: Base64 encoded Ed25519 keys used for JSON Web Token (JWT) authentication. You must generate your own keypair using `go run tools/gen-keypair.go`. Next to the `gen-keypair.go` utility, you will find a README with more information about how to use these keys and where to put tokens.
* `SESSION_KEY`: Some random bytes used as secret for cookie-based sessions. * `SESSION_KEY`: Some random bytes used as secret for cookie-based sessions.
* `LDAP_ADMIN_PASSWORD`: The LDAP admin user password (optional). * `LDAP_ADMIN_PASSWORD`: The LDAP admin user password (optional).
* `LOGLEVEL`: Can be `err`, `warn`, `info` or `debug` (optional, `debug` by default). Can be used to reduce logging.

View File

@ -13,8 +13,8 @@ yarn install
yarn build yarn build
cd ../.. cd ../..
# Use your own keys in production!
cp ./configs/env-template.txt .env cp ./configs/env-template.txt .env
go get
go build ./cmd/cc-backend go build ./cmd/cc-backend
./cc-backend --init-db --add-user demo:admin:AdminDev ./cc-backend --init-db --add-user demo:admin:AdminDev