-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
67 lines (45 loc) · 1.6 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
55
56
57
58
59
60
61
62
63
64
65
66
67
set dotenv-load
test_log := env_var_or_default("TEST_LOG", "false")
local-start:
cargo run
local-migrate *args:
cargo run -p migration -- {{args}}
local-fmt:
cargo fmt --all
local-test *args:
cargo nextest run -p server {{args}}
local-clippy:
cargo +nightly clippy --tests --benches --all-targets --all-features -- -D warnings
build:
cargo build --release
start:
docker compose up -d
start-rebuild:
docker compose up -d --build server
stop:
docker compose down
run *args:
docker compose exec -e TEST_LOG={{test_log}} -e S3__BASE_URL=http://s3:9000 server {{args}}
db +args:
docker compose exec postgres {{args}}
server script *args:
just run cargo {{script}} -p server {{args}}
entity script *args:
just run cargo {{script}} -p entity {{args}}
migration script *args:
just run cargo {{script}} -p migration {{args}}
migrate +args:
just migration run -- {{args}}
test *args:
just run cargo nextest run -p server {{args}}
wipe:
just stop || echo ""
docker system prune --volumes -f
clippy:
just run cargo clippy --tests --benches --all-targets --all-features -- -D warnings
fmt:
just run cargo fmt --all
release:
pnpm -C clients/ts run release && mv clients/ts/CHANGELOG.md CHANGELOG.md && git add . && git commit -m "chore: Update changelog" && git push
service-start-s3:
docker run -e MINIO_ROOT_USER=lyonkit -e MINIO_ROOT_PASSWORD=lyonkit-s3-secret -p 9000:9000 -p 9001:9001 --name s3 --health-cmd "curl -f http://localhost:9000/minio/health/live" --health-interval 30s --health-retries 3 --health-timeout 20s -d bitnami/minio:latest