add justfile

This commit is contained in:
2026-08-24 11:48:06 +01:00
parent 9646803577
commit 2652f09485
2 changed files with 67 additions and 19 deletions
Generated
+19 -19
View File
@@ -186,25 +186,6 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "chat-service"
version = "0.0.1"
dependencies = [
"axum",
"chrono",
"dashmap",
"idna 0.5.0",
"serde",
"serde_json",
"tokio",
"tower",
"tower-http",
"tracing",
"tracing-subscriber",
"url",
"uuid",
]
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.35" version = "0.4.35"
@@ -1242,6 +1223,25 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "user-to-support-chat"
version = "0.1.1"
dependencies = [
"axum",
"chrono",
"dashmap",
"idna 0.5.0",
"serde",
"serde_json",
"tokio",
"tower",
"tower-http",
"tracing",
"tracing-subscriber",
"url",
"uuid",
]
[[package]] [[package]]
name = "utf-8" name = "utf-8"
version = "0.7.6" version = "0.7.6"
+48
View File
@@ -0,0 +1,48 @@
SERVER := "bl@flo-homeserver"
PKG := "user-to-support-chat"
BINARY := "target/release/user-to-support-chat"
DEV_DIR := "./local"
DEV_BINARY := DEV_DIR + "/user-to-support-chat"
default:
@just --list
build: clippy fmt build-release
build-release:
cargo build --release
deploy: build
ssh {{SERVER}} "rm -rf /tmp/{{PKG}}-deploy && mkdir -p /tmp/{{PKG}}-deploy"
rsync -avz --delete {{BINARY}} {{SERVER}}:/tmp/{{PKG}}-deploy/
ssh -t {{SERVER}} "sudo rsync -a --delete --exclude='.env' --exclude='config.json' --exclude='data/' --chown={{PKG}}:{{PKG}} /tmp/{{PKG}}-deploy/ /opt/{{PKG}}/ && sudo systemctl restart {{PKG}}"
ssh {{SERVER}} "rm -rf /tmp/{{PKG}}-deploy"
dev-build: clippy fmt dev-build-debug
dev-build-debug:
mkdir -p {{DEV_DIR}}
cargo build
dev-start:
rm -rf {{DEV_DIR}}
mkdir -p {{DEV_DIR}}
cargo build
cp target/debug/{{PKG}} {{DEV_BINARY}}
cd {{DEV_DIR}} && ./{{PKG}}
run:
cargo run
clippy:
cargo clippy -- -D warnings
fmt:
cargo fmt
test:
cargo test
clean:
cargo clean
rm -rf {{DEV_DIR}}