-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
54 lines (46 loc) · 1.29 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
alias b := build
[private]
default:
@just --list
build-package PACKAGE *ARGS:
#!/usr/bin/env bash
set -euo pipefail
cargo build -p {{PACKAGE}} {{ARGS}}
build *ARGS:
just build-package server {{ARGS}}
just build-package spa --target wasm32-unknown-unknown {{ARGS}}
clippy-package PACKAGE *ARGS="--locked":
cargo clippy -p {{PACKAGE}} {{ARGS}}
clippy *ARGS="--locked":
just clippy-package server {{ARGS}}
just clippy-package spa --target wasm32-unknown-unknown {{ARGS}}
build-container:
#!/usr/bin/env bash
set -euo pipefail
nix build ".#containerImage"
IMAGE_TAG=$(docker load < result | awk '{ print $3 }')
docker tag "$IMAGE_TAG" "bookmark-hub:latest"
run-spa:
#!/usr/bin/env bash
set -euo pipefail
pushd spa
trunk serve
popd
run-server:
#!/usr/bin/env sh
DATA_DIR="/tmp/bookmark-hub-datadir"
if [[ ! -d "$DATA_DIR" ]]; then
mkdir -p "$DATA_DIR"
fi
RUST_BACKTRACE=full RUST_LOG=info,server=debug cargo run --bin server -- \
--hmac-key secret \
--pg-host localhost \
--pg-port 5432 \
--pg-user main \
--pg-password main \
--pg-database main \
--pg-max-connections 5 \
--readability-url "http://localhost:3001" \
--data-dir "$DATA_DIR" \
--ollama-url "http://localhost:11434" \
--ollama-text-model "llama3.2:latest"