chore: created asciidoc documents from documentation

closes: #74
master
Niclas Thobaben 2024-03-09 18:57:38 +01:00
parent 5b4dbdccb8
commit 0bc3a9ccfa
4 changed files with 46 additions and 1 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@ bin/
.env
*_templ.go
docs/out

View File

@ -5,7 +5,6 @@ import (
"git.l--n.de/nclazz/soundwerft/api/web/templates/partials"
)
templ IndexPage(view web.View) {
@partials.Document(view) {
<h1>SoundWerft</h1>

View File

@ -0,0 +1,18 @@
= Command Line
== Usage
[source,bash]
----
soundwerft [options] [arguments...]
----
== Options
* +--help+, +-h+: show usage text and exit
* +--config path+, +-c path+: path to an existing config file
* +--log-level level+: log level to use throghout the app +debug | info | warn | error+, default: +info+
* +--log-format format+: format of the logs +json | text+, default: +json+
* +--host host+: hostname or IP address to bind to, default +0.0.0.0+
* +--port port+: port on which to run http endpoints, default: +8080+
* +--base-url path+: base url for links and redirects (useful when run behind a reverse proxy), default: +/+

View File

@ -0,0 +1,27 @@
= Environment Variables
The environment variables reflect the command-line options. If both a command-line option and an environment variable
is present, the flag takes priority over the environment variable.
All variables follow the format +SW_<option>+, i.e. the flag +--log-level+, becomes +SW_LOG_LEVEL+.
The variables need to be defined before starting the app, for example:
----
SW_LOG_LEVEL=debug ./soundwerft
----
== Define in env-file
Instead of defining each variable as an environment variable, an env-file can be used, in which all variables are defined.
If a filed called +.env+ is present in the current working directory, it will automatically be used.
Otherwise, the file can be specified by starting the app with +--config / -c+ option.
== Variables
* +SW_LOG_LEVEL+: log level to use throughout the app +debug | info | warn | error+, default: +info+
* +SW_LOG_FORMAT+: format of the logs +json | text+, default: +json+
* +SW_HOST+: hostname or IP to bind to, default +0.0.0.0+
* +SW_PORT+: port on which to run http endpoints, default +8080+
* +SW_BASE_URL+: base url for links and redirects (useful when run behind a reverse proxy), default +/+