-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
42 lines (35 loc) · 1.06 KB
/
justfile
File metadata and controls
42 lines (35 loc) · 1.06 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
# celerix-flow Task Runner
# Translates Docker multi-stage build to local commands
set dotenv-load := true
export PORT := "8085"
export DATA_DIR := "./data"
export STORAGE_DIR := "./data/uploads"
# Default recipe: show available commands
default:
@just --list
# 1. Frontend Build Stage
build-frontend:
cd frontend && npm install
cd frontend && npm run build
# 2. Backend Build Stage (Depends on Frontend)
# This mimics the COPY --from=frontend-builder step
build-backend: build-frontend
# Prepare distribution directory in backend
mkdir -p backend/cmd/flow/dist
cp -r frontend/dist/* backend/cmd/flow/dist/
cp version.json backend/cmd/flow/version.json
# Build the Go binary
cd backend && CGO_ENABLED=0 go build -ldflags="-s -w" -o ../flow ./cmd/flow/main.go
# 3. Setup local environment
setup:
mkdir -p data/uploads
# 4. Final 'Run' command (Stage 3 equivalent)
run: build-backend setup
./flow
# Clean up artifacts
clean:
rm -rf frontend/dist
rm -rf backend/cmd/flow/dist
rm -f flow
dev-backend:
cd backend && air && cd ..