Update readme and add config samples

This commit is contained in:
2022-05-09 22:55:22 +02:00
parent 438725066e
commit 0049ad99de
3 changed files with 28 additions and 2 deletions

View File

@@ -47,7 +47,6 @@ On your machine:
```bash
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceaccount.json
speedrun init
speedrun run whoami --insecure
```
@@ -107,7 +106,7 @@ speedrun run whoami -c /path/to/config.toml
```
## Configuration
Default config file is located at `~/.speedrun/config.toml` and default settings can be generated via `speedrun init --print`.
Config samples are located under [conf](conf/).
#### Run Portal as a systemd service
Find a sample unit [here](init/portal.service)

12
conf/portal.toml Normal file
View File

@@ -0,0 +1,12 @@
address = "0.0.0.0" # address to which to bind
port = 1337 # port on which to listen for incoming connections
[logging]
json = false # output logs in json format
loglevel = "info" # how much log output to spam
[tls]
ca = "ca.crt" # certificate authority cert/bundle
cert = "portal.crt" # client certificate used during mTLS
key = "portal.key" # client key used during mTLS
insecure = false # setting this to true will make speedrun skip portal's certificate validation step

15
conf/speedrun.toml Normal file
View File

@@ -0,0 +1,15 @@
[gcp]
projectid = "yourproject" # GCP project ID
[logging]
json = false # output logs in json format
loglevel = "info" # how much log output to spam
[portal]
use-private-ip = false # try to connect to private IP of the instances rather than to the public
[tls]
ca = "ca.crt" # certificate authority cert/bundle
cert = "speedrun.crt" # client certificate used during mTLS
key = "speedrun.key" # client key used during mTLS
insecure = false # setting this to true will make speedrun skip portal's certificate validation step