-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
40 lines (33 loc) · 958 Bytes
/
justfile
File metadata and controls
40 lines (33 loc) · 958 Bytes
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
set shell := ["sh", "-c"]
# Variables
binary := "celerix-stored"
image := "celerix/stored"
version := "1.0.0"
port := "7001"
# Default command: show available recipes
default:
@just --list
# Build the static binary for Distroless/Linux
build:
@echo "Building static binary..."
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/{{binary}} ./cmd/celerix-stored/main.go
# Run the store locally with the dev port
run: build
@echo "Starting {{binary}} on port {{port}}..."
CELERIX_STORE_PORT={{port}} ./bin/{{binary}}
# Clean build artifacts and temp files
clean:
@echo "Cleaning up..."
rm -rf bin/
rm -f data/*.tmp
# Run unit tests
unit-tests:
@echo "Running unit tests..."
go test -v ./...
# Run a quick terminal health check
[confirm]
test: unit-tests
@echo "Running TCP Health Check..."
@echo "PING" | nc localhost {{port}}
@echo "LIST_PERSONAS" | nc localhost {{port}}