forked from fluxerapp/fluxer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
94 lines (72 loc) · 2.78 KB
/
Copy pathjustfile
File metadata and controls
94 lines (72 loc) · 2.78 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
env_file := "dev/.env"
compose_file := "dev/compose.yaml"
data_compose := "dev/compose.data.yaml"
network_name := "fluxer-shared"
compose_base := "docker compose --env-file " + env_file + " -f " + compose_file
livekit_template := "dev/templates/livekit.yaml"
up *SERVICES:
just ensure-network
{{compose_base}} up -d {{SERVICES}}
watch *SERVICES:
just ensure-network
{{compose_base}} watch {{SERVICES}}
down:
{{compose_base}} down
nuke:
{{compose_base}} down -v
restart *SERVICES:
{{compose_base}} restart {{SERVICES}}
logs *SERVICES:
{{compose_base}} logs -f --tail 100 {{SERVICES}}
ps:
{{compose_base}} ps
sh SERVICE shell="sh":
{{compose_base}} exec {{SERVICE}} {{shell}}
exec SERVICE CMD:
{{compose_base}} exec {{SERVICE}} sh -c "{{CMD}}"
livekit-sync:
set -euo pipefail
if [ ! -f {{env_file}} ]; then
echo "{{env_file}} missing"
exit 1
fi
node --env-file {{env_file}} scripts/just/livekit-sync.js --output dev/livekit.yaml
ensure-network:
set -euo pipefail
docker network inspect {{network_name}} >/dev/null 2>&1 || docker network create {{network_name}}
bootstrap:
just ensure-network
just livekit-sync
setup:
set -euo pipefail
just ensure-network
if [ ! -f dev/.env ]; then
cp dev/.env.example dev/.env
fi
if [ ! -f dev/livekit.yaml ]; then
cp {{livekit_template}} dev/livekit.yaml
fi
mig name:
@cargo run --release --quiet --manifest-path scripts/cassandra-migrate/Cargo.toml -- create "{{name}}"
mig-check:
@cargo run --release --quiet --manifest-path scripts/cassandra-migrate/Cargo.toml -- check
mig-up host="localhost" user="cassandra" pass="cassandra":
@cargo run --release --quiet --manifest-path scripts/cassandra-migrate/Cargo.toml -- --host "{{host}}" --username "{{user}}" --password "{{pass}}" up
mig-status host="localhost" user="cassandra" pass="cassandra":
@cargo run --release --quiet --manifest-path scripts/cassandra-migrate/Cargo.toml -- --host "{{host}}" --username "{{user}}" --password "{{pass}}" status
lic:
@cargo run --release --quiet --manifest-path scripts/license-enforcer/Cargo.toml
snow count="1":
@cargo run --release --quiet --manifest-path scripts/snowflake-generator/Cargo.toml -- --count {{count}}
integration-tests:
set -euo pipefail
trap 'docker compose -f tests/integration/compose.yaml down' EXIT
docker compose -f tests/integration/compose.yaml up --build --abort-on-container-exit integration-tests
go-tools-install:
GOTOOLCHAIN=go1.25.5 go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
GOTOOLCHAIN=go1.25.5 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
go-integration-check:
gofmt -w tests/integration
go test ./tests/integration/...
$(go env GOPATH)/bin/staticcheck ./tests/integration/...
$(go env GOPATH)/bin/golangci-lint run ./tests/integration/...