The server handles components, incidents and other resources according to the Open API spec for status page.
The service can be configured by either providing flags to the binary or via environment variables.
Changeing the listining address to localhost:3001
.
./bin/status-page-api --server-listen-address :3001
Every config key is prefixed by STATUS_PAGE
.
STATUS_PAGE_SERVER_LISTEN_ADDRESS=:3001 ./bin/status-page-api
Default logging level is set to WARN
level and can be increased by adding -v
to the binary, to a maximum of -vvv
being the TRACE
level.
Setting verbosity by environment variables requires setting it to a number.
# INFO level
STATUS_PAGE_VERBOSE=1
# DEBUG level
STATUS_PAGE_VERBOSE=2
# TRACE level
STATUS_PAGE_VERBOSE=3
Create secrets.env
for config:
STATUS_PAGE_VERBOSE=3
STATUS_PAGE_SWAGGER_UI_ENABLED=true
STATUS_PAGE_SERVER_LISTEN_ADDRESS=:3000
STATUS_PAGE_SERVER_CORS_ORIGINS="localhost 127.0.0.1"
STATUS_PAGE_DATABASE_CONNECTION_STRING="host=127.0.0.1 user=postgres dbname=postgres port=5432 password=debug sslmode=disable"
STATUS_PAGE_PROVISIONING_FILE=./provisioning.yaml
STATUS_PAGE_SERVER_SWAGGER_UI_ENABLED
enables the Swagger Web UI for local debugging purposes, which is disabled by default.
STATUS_PAGE_METRICS_ADDRESS=:9000
enables the /metrics
endpoint on the configured port for Prometheus scraping.
Source the env before executing the binary, to configure the service.
The Makefile
target make serve
sources the env file secrets.env
by default.