aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/push.yml1
-rw-r--r--README.md27
-rw-r--r--src/config.rs1
-rw-r--r--src/main.rs1
4 files changed, 25 insertions, 5 deletions
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index c04a19a..bdedfee 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -47,3 +47,4 @@ jobs:
47 tags: | 47 tags: |
48 ghcr.io/fxqnlr/webol:dev-latest 48 ghcr.io/fxqnlr/webol:dev-latest
49 ghcr.io/fxqnlr/webol:dev-${{ github.run_number }} 49 ghcr.io/fxqnlr/webol:dev-${{ github.run_number }}
50 ghcr.io/fxqnlr/webol:${{ env.CARGO_PKG_VERSION }}
diff --git a/README.md b/README.md
index eabc051..88f786a 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,28 @@
1# webol 1# webol
2 2
3DATABASE_URL: `String` 3## Config
4Default `config.toml`:
5```toml
6serveraddr = "0.0.0.0:7229" # String
7pingtimeout = 10 # i64
8pingthreshold = 1 # i64
9timeoffset = 0 # i8
4 10
5WEBOL_APIKEY: `String` 11[auth]
12method = "none" # "none"|"key"
13secret = "" # String
14```
6 15
7WEBOL_SERVERADDR: `Option<String>` (0.0.0.0:7229) 16## Docker
8 17
9WEBOL_PINGTIMEOUT: `Option<i64>` (10) 18minimal `docker-compose.yaml`:
19```yaml
20services:
21 webol:
22 image: ghcr.io/fxqnlr/webol:0.4.0
23 container_name: webol
24 restart: unless-stopped
25 volumes:
26 - ./devices:/devices
27 network_mode: host
28```
diff --git a/src/config.rs b/src/config.rs
index 124893b..bfb28be 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -25,6 +25,7 @@ impl Config {
25 .set_default("pingtimeout", 10)? 25 .set_default("pingtimeout", 10)?
26 .set_default("pingthreshold", 1)? 26 .set_default("pingthreshold", 1)?
27 .set_default("timeoffset", 0)? 27 .set_default("timeoffset", 0)?
28 .set_default("auth.method", "none")?
28 .set_default("auth.secret", "")? 29 .set_default("auth.secret", "")?
29 .add_source(File::with_name("config.toml").required(false)) 30 .add_source(File::with_name("config.toml").required(false))
30 .add_source(File::with_name("config.dev.toml").required(false)) 31 .add_source(File::with_name("config.dev.toml").required(false))
diff --git a/src/main.rs b/src/main.rs
index cf0d39b..779385f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -68,7 +68,6 @@ impl Modify for SecurityAddon {
68} 68}
69 69
70#[tokio::main] 70#[tokio::main]
71#[allow(deprecated)]
72async fn main() -> color_eyre::eyre::Result<()> { 71async fn main() -> color_eyre::eyre::Result<()> {
73 color_eyre::install()?; 72 color_eyre::install()?;
74 73