-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
85 lines (66 loc) · 2.31 KB
/
Copy pathJustfile
File metadata and controls
85 lines (66 loc) · 2.31 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
default: dev
# Start all services via Docker Compose
dev:
docker compose up --build
# Start services in the background
dev-bg:
docker compose up --build -d
# Start all services including Readium LCP/LSD (requires LCP images — see .env.lcp.example)
dev-lcp:
docker compose --profile lcp up --build
# Stop all services
down:
docker compose down
# Stop and remove volumes (full reset)
down-clean:
docker compose down -v
# Apply schema files against DATABASE_URL (production / external DB use).
# In development, schema is applied automatically via postgres's initdb mechanism.
db-migrate:
go run ./tools/migrate
# Build all Go services
build:
go build ./curios-manager/...
go build ./users-manager/...
go build ./network-manager/...
# Run all Go tests
test:
go test ./...
# Generate Go code from proto files into gen/
# Requires: brew install protobuf protoc-gen-go protoc-gen-go-grpc
proto:
protoc \
--go_out=./gen --go_opt=module=tiny-ils/gen \
--go-grpc_out=./gen --go-grpc_opt=module=tiny-ils/gen \
proto/curios.proto \
proto/users.proto \
proto/network.proto \
proto/internal.proto
# Install frontend Node.js dependencies
frontend-install:
cd frontend && npm install
# View logs for a specific service (e.g. just logs curios-manager)
logs service:
docker compose logs -f {{service}}
# Open a psql shell against the dev database
db:
docker compose exec postgres psql -U tils -d tils
# ─── Two-node testing ─────────────────────────────────────────────────────────
# Start Node B peer cluster (Node A is the default `just dev`)
node-b:
docker compose -f docker-compose.node-b.yml up --build
# Start Node B in the background
node-b-bg:
docker compose -f docker-compose.node-b.yml up --build -d
# Stop Node B (simulate peer going offline)
node-b-down:
docker compose -f docker-compose.node-b.yml down
# Full reset of Node B (remove volumes)
node-b-clean:
docker compose -f docker-compose.node-b.yml down -v
# Seed Node A with test curios via gRPC
seed:
CURIOS_GRPC=localhost:50151 go run ./tools/seed
# Seed Node B with test curios via gRPC
seed-b:
CURIOS_GRPC=localhost:50161 go run ./tools/seed