Skip to content

Commit

Permalink
chore: enhance deployment utils
Browse files Browse the repository at this point in the history
  • Loading branch information
artiga033 committed May 14, 2024
1 parent fd0e2ec commit 4e8781d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ services:
image: ghcr.io/artiga033/kritor_agent_server
build: .
ports:
- "15500:15500"
- "51405:51405"
volumes:
- ./kritor_agent.toml:/app/kritor_agent.toml
11 changes: 11 additions & 0 deletions kritor_agent/kritor_agent.example.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[server]
listen = "127.0.0.1:51405"
rust_log = "info"

[backend]
type = "satori"
scheme = "http"
host = "127.0.0.1"
port = 15500
version = "v1"
token = "super_secret"
5 changes: 5 additions & 0 deletions kritor_agent/src/bin/server/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ async fn main() -> anyhow::Result<()> {
println!("config_path: {}", config_path);
let config = Config::from_file(config_path);

if let Some(("gen-example",_))= matches.subcommand(){
gen_example_config(config_path)?;
return Ok(());
}

if let Err(e) = &config {
if let Some(e) = e.downcast_ref::<io::Error>() {
if e.kind() == io::ErrorKind::NotFound {
Expand Down

0 comments on commit 4e8781d

Please sign in to comment.