forked from ShipSecAI/studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
582 lines (518 loc) · 24.5 KB
/
justfile
File metadata and controls
582 lines (518 loc) · 24.5 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
#!/usr/bin/env just
# ShipSec Studio - Development Environment
# Run `just` or `just help` to see available commands
default:
@just help
# === Development (recommended for contributors) ===
# Default dev passwords for convenience (override with env vars for real security)
export OPENSEARCH_ADMIN_PASSWORD := env_var_or_default("OPENSEARCH_ADMIN_PASSWORD", "admin")
export OPENSEARCH_DASHBOARDS_PASSWORD := env_var_or_default("OPENSEARCH_DASHBOARDS_PASSWORD", "admin")
# Initialize environment files from examples
init:
#!/usr/bin/env bash
set -euo pipefail
echo "🔧 Setting up ShipSec Studio..."
# Install dependencies if needed
if [ ! -d "node_modules" ]; then
echo "📦 Installing dependencies..."
bun install
echo "✅ Dependencies installed"
else
echo "✅ Dependencies already installed"
fi
# Copy env files if they don't exist
[ ! -f "backend/.env" ] && cp backend/.env.example backend/.env && echo "✅ Created backend/.env"
[ ! -f "worker/.env" ] && cp worker/.env.example worker/.env && echo "✅ Created worker/.env"
[ ! -f "frontend/.env" ] && cp frontend/.env.example frontend/.env && echo "✅ Created frontend/.env"
echo ""
echo "🎉 Setup complete!"
echo " Edit the .env files to configure your environment"
echo " Then run: just dev"
# Start development environment with hot-reload
# Auto-detects auth mode: if CLERK_SECRET_KEY is set in backend/.env → secure mode (Clerk + OpenSearch Security)
# Otherwise → local auth mode (faster startup, no multi-tenant isolation)
# Supports multi-instance: set SHIPSEC_INSTANCE=N (or .shipsec-instance file) to run on offset ports
dev action="start":
#!/usr/bin/env bash
set -euo pipefail
# Resolve active instance: env var → .shipsec-instance file → default 0
if [ -n "${SHIPSEC_INSTANCE:-}" ]; then
INST="${SHIPSEC_INSTANCE}"
elif [ -f ".shipsec-instance" ]; then
INST="$(tr -d '[:space:]' < .shipsec-instance || true)"
INST="${INST:-0}"
else
INST="0"
fi
export SHIPSEC_INSTANCE="$INST"
# Instance-aware PM2 app names and ports
PM2_APPS="shipsec-frontend-${INST},shipsec-backend-${INST},shipsec-worker-${INST}"
FRONTEND_PORT=$(( 5173 + INST * 100 ))
BACKEND_PORT=$(( 3211 + INST * 100 ))
# Auto-detect auth mode from backend/.env
CLERK_KEY=""
if [ -f "backend/.env" ]; then
CLERK_KEY=$(grep -E '^CLERK_SECRET_KEY=' backend/.env | cut -d= -f2- | tr -d '"' | tr -d "'" | xargs || true)
fi
if [ -n "$CLERK_KEY" ]; then
SECURE_MODE=true
else
SECURE_MODE=false
fi
case "{{action}}" in
start)
# Check for required env files
if [ ! -f "backend/.env" ] || [ ! -f "worker/.env" ] || [ ! -f "frontend/.env" ]; then
echo "❌ Environment files not found!"
echo ""
echo " Run this first: just init"
echo ""
echo " This will create .env files from the example templates."
exit 1
fi
if [ "$SECURE_MODE" = "true" ]; then
echo "🔐 Starting development environment (Clerk auth, instance ${INST})..."
# Auto-generate certificates if they don't exist
if [ ! -f "docker/certs/root-ca.pem" ]; then
echo "🔐 Generating TLS certificates..."
chmod +x docker/scripts/generate-certs.sh
docker/scripts/generate-certs.sh
echo "✅ Certificates generated"
fi
# Start infrastructure with security enabled
# Note: dev-ports.yml exposes OpenSearch on localhost for backend tenant provisioning
echo "🚀 Starting infrastructure with OpenSearch Security..."
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-secure.yml -f docker/docker-compose.dev-ports.yml up -d
# Wait for Postgres
echo "⏳ Waiting for infrastructure..."
timeout 30s bash -c 'until docker exec shipsec-postgres pg_isready -U shipsec >/dev/null 2>&1; do sleep 1; done' || true
# Wait for OpenSearch to be healthy (security init takes longer)
echo "⏳ Waiting for OpenSearch security initialization..."
timeout 120s bash -c 'until docker exec shipsec-opensearch curl -sf -u admin:${OPENSEARCH_ADMIN_PASSWORD:-admin} --cacert /usr/share/opensearch/config/certs/root-ca.pem https://localhost:9200/_cluster/health >/dev/null 2>&1; do sleep 2; done' || true
# Update git SHA and start PM2 with security enabled
./scripts/set-git-sha.sh || true
SHIPSEC_INSTANCE="$INST" SHIPSEC_ENV=development NODE_ENV=development OPENSEARCH_SECURITY_ENABLED=true NODE_TLS_REJECT_UNAUTHORIZED=0 \
pm2 startOrReload pm2.config.cjs --only "$PM2_APPS" --update-env
echo ""
echo "✅ Development environment ready (secure mode, instance ${INST})"
if [ "$INST" = "0" ]; then
echo " App: http://localhost (via nginx)"
echo " API: http://localhost/api"
fi
echo " Frontend: http://localhost:${FRONTEND_PORT}"
echo " Backend: http://localhost:${BACKEND_PORT}"
echo " Analytics: http://localhost/analytics (requires login)"
echo " Temporal UI: http://localhost:8081"
echo ""
echo "🔐 OpenSearch Security: ENABLED (multi-tenant isolation active)"
echo " OpenSearch admin: admin / ${OPENSEARCH_ADMIN_PASSWORD:-admin}"
else
echo "🚀 Starting development environment (local auth, instance ${INST})..."
# Start infrastructure (no security, with dev ports for analytics)
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml up -d
# Wait for Postgres
echo "⏳ Waiting for infrastructure..."
timeout 30s bash -c 'until docker exec shipsec-postgres pg_isready -U shipsec >/dev/null 2>&1; do sleep 1; done' || true
# Update git SHA and start PM2
./scripts/set-git-sha.sh || true
SHIPSEC_INSTANCE="$INST" SHIPSEC_ENV=development NODE_ENV=development OPENSEARCH_SECURITY_ENABLED=false \
OPENSEARCH_URL=http://localhost:9200 \
pm2 startOrReload pm2.config.cjs --only "$PM2_APPS" --update-env
echo ""
echo "✅ Development environment ready (local auth, instance ${INST})"
if [ "$INST" = "0" ]; then
echo " App: http://localhost (via nginx)"
fi
echo " Frontend: http://localhost:${FRONTEND_PORT}"
echo " Backend: http://localhost:${BACKEND_PORT}"
echo " Analytics: http://localhost/analytics"
echo " Temporal UI: http://localhost:8081"
echo ""
if [ "$INST" != "0" ]; then
echo "💡 Instance ${INST}: access your app directly at http://localhost:${FRONTEND_PORT}"
echo " (nginx always routes to instance 0)"
echo ""
fi
echo "💡 To enable Clerk auth + OpenSearch Security:"
echo " Set CLERK_SECRET_KEY in backend/.env, then restart"
fi
echo ""
echo "💡 just dev logs - View application logs"
echo "💡 just dev stop - Stop everything"
echo "💡 just dev clean - Stop and remove all data"
echo ""
# Version check
bun backend/scripts/version-check-summary.ts 2>/dev/null || true
;;
stop)
echo "🛑 Stopping development environment (instance ${INST})..."
pm2 delete shipsec-frontend-${INST} shipsec-backend-${INST} shipsec-worker-${INST} 2>/dev/null || true
# Only stop infra if instance 0 (shared infra serves all instances)
if [ "$INST" = "0" ]; then
if [ "$SECURE_MODE" = "true" ]; then
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-secure.yml -f docker/docker-compose.dev-ports.yml down
else
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml down
fi
fi
echo "✅ Stopped instance ${INST}"
;;
logs)
pm2 logs shipsec-frontend-${INST} shipsec-backend-${INST} shipsec-worker-${INST}
;;
status)
pm2 status
if [ "$SECURE_MODE" = "true" ]; then
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-secure.yml -f docker/docker-compose.dev-ports.yml ps
else
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml ps
fi
;;
clean)
echo "🧹 Cleaning development environment (instance ${INST})..."
pm2 delete shipsec-frontend-${INST} shipsec-backend-${INST} shipsec-worker-${INST} 2>/dev/null || true
# Only tear down infra if instance 0
if [ "$INST" = "0" ]; then
if [ "$SECURE_MODE" = "true" ]; then
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-secure.yml -f docker/docker-compose.dev-ports.yml down -v
else
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml down -v
fi
echo "✅ Development environment cleaned (PM2 stopped, infrastructure volumes removed)"
else
echo "✅ Instance ${INST} PM2 apps stopped (shared infra left running)"
fi
;;
*)
echo "Usage: just dev [start|stop|logs|status|clean]"
;;
esac
# === Production (Docker-based) ===
# Run production environment in Docker
# Auto-detects security mode: if TLS certs exist (docker/certs/root-ca.pem) → secure mode with multitenancy
# Otherwise → standard mode without OpenSearch Security
prod action="start":
#!/usr/bin/env bash
set -euo pipefail
# Auto-detect security mode from TLS certificates
if [ -f "docker/certs/root-ca.pem" ]; then
SECURE_MODE=true
else
SECURE_MODE=false
fi
# Compose file selection based on mode
if [ "$SECURE_MODE" = "true" ]; then
COMPOSE_CMD="docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.prod.yml"
else
COMPOSE_CMD="docker compose -f docker/docker-compose.full.yml"
fi
case "{{action}}" in
start)
if [ "$SECURE_MODE" = "true" ]; then
echo "🔐 Starting production environment (secure mode)..."
# Check for required env vars in secure mode
if [ -z "${OPENSEARCH_ADMIN_PASSWORD:-}" ] || [ -z "${OPENSEARCH_DASHBOARDS_PASSWORD:-}" ]; then
echo "❌ Required environment variables not set!"
echo ""
echo " export OPENSEARCH_ADMIN_PASSWORD='your-secure-password'"
echo " export OPENSEARCH_DASHBOARDS_PASSWORD='your-secure-password'"
exit 1
fi
$COMPOSE_CMD up -d
echo ""
echo "✅ Production environment ready (secure mode)"
echo " Analytics: https://localhost/analytics (requires auth)"
echo " OpenSearch: https://localhost:9200 (TLS enabled)"
echo ""
echo "💡 See docker/PRODUCTION.md for customer provisioning"
else
echo "🚀 Starting production environment..."
$COMPOSE_CMD up -d
echo ""
echo "✅ Production environment ready"
echo " App: http://localhost"
echo " API: http://localhost/api"
echo " Analytics: http://localhost/analytics"
echo ""
echo "🔒 All internal service ports are disabled (no direct access)"
echo ""
echo "💡 To enable security + multitenancy:"
echo " Run: just generate-certs"
fi
# Version check
bun backend/scripts/version-check-summary.ts 2>/dev/null || true
;;
stop)
$COMPOSE_CMD down
echo "✅ Production stopped"
;;
build)
echo "🔨 Building and starting production..."
# Auto-detect git version: prioritize tag, then SHA, then "dev"
GIT_TAG=$(git describe --exact-match --tags 2>/dev/null || echo "")
if [ -n "$GIT_TAG" ]; then
export GIT_SHA="$GIT_TAG"
echo "📌 Building with tag: $GIT_SHA"
else
export GIT_SHA=$(git rev-parse --short=7 HEAD 2>/dev/null || echo "dev")
echo "📌 Building with commit: $GIT_SHA"
fi
$COMPOSE_CMD up -d --build
echo "✅ Production built and started"
echo ""
# Version check
bun backend/scripts/version-check-summary.ts 2>/dev/null || true
;;
logs)
$COMPOSE_CMD logs -f
;;
status)
$COMPOSE_CMD ps
;;
clean)
$COMPOSE_CMD down -v
docker system prune -f
echo "✅ Production cleaned"
;;
start-latest)
echo "🔍 Fetching latest release information from GitHub API..."
if ! command -v curl &> /dev/null || ! command -v jq &> /dev/null; then
echo "❌ curl or jq is not installed. Please install them first."
exit 1
fi
LATEST_TAG=$(curl -s https://api.github.com/repos/ShipSecAI/studio/releases | jq -r '.[0].tag_name')
# Strip leading 'v' if present (v0.1-rc2 -> 0.1-rc2)
LATEST_TAG="${LATEST_TAG#v}"
if [ "$LATEST_TAG" == "null" ] || [ -z "$LATEST_TAG" ]; then
echo "❌ Could not find any releases. Please check the repository at https://github.com/ShipSecAI/studio/releases"
exit 1
fi
echo "📦 Found latest release: $LATEST_TAG"
echo "📥 Pulling matching images from GHCR..."
docker pull ghcr.io/shipsecai/studio-backend:$LATEST_TAG
docker pull ghcr.io/shipsecai/studio-frontend:$LATEST_TAG
docker pull ghcr.io/shipsecai/studio-worker:$LATEST_TAG
echo "🚀 Starting production environment with version $LATEST_TAG..."
export SHIPSEC_TAG=$LATEST_TAG
$COMPOSE_CMD up -d
echo ""
echo "✅ ShipSec Studio $LATEST_TAG ready"
echo " App: http://localhost"
echo " API: http://localhost/api"
echo " Analytics: http://localhost/analytics"
echo ""
echo "🔒 All internal service ports are disabled (no direct access)"
echo "💡 Note: Using images tagged as $LATEST_TAG"
;;
*)
echo "Usage: just prod [start|start-latest|stop|build|logs|status|clean]"
;;
esac
# === Production Images (GHCR-based) ===
# Run production environment using prebuilt GHCR images
prod-images action="start":
#!/usr/bin/env bash
set -euo pipefail
case "{{action}}" in
start)
echo "🚀 Starting production environment with GHCR images..."
# Check if images exist locally, pull if needed
echo "🔍 Checking for local images..."
if ! docker images --format "{{{{.Repository}}}}:{{{{.Tag}}}}" | grep -q "ghcr.io/shipsecai/studio-frontend"; then
echo "📥 Pulling GHCR images..."
docker pull ghcr.io/shipsecai/studio-frontend:latest || echo "⚠️ Frontend image not found, will build locally"
else
echo "✅ Frontend image found locally"
fi
if ! docker images --format "{{{{.Repository}}}}:{{{{.Tag}}}}" | grep -q "ghcr.io/shipsecai/studio-backend"; then
docker pull ghcr.io/shipsecai/studio-backend:latest || echo "⚠️ Backend image not found, will build locally"
else
echo "✅ Backend image found locally"
fi
if ! docker images --format "{{{{.Repository}}}}:{{{{.Tag}}}}" | grep -q "ghcr.io/shipsecai/studio-worker"; then
docker pull ghcr.io/shipsecai/studio-worker:latest || echo "⚠️ Worker image not found, will build locally"
else
echo "✅ Worker image found locally"
fi
# Start with GHCR images, fallback to local build
DOCKER_BUILDKIT=1 docker compose -f docker/docker-compose.full.yml up -d
echo ""
echo "✅ Production environment ready"
echo " App: http://localhost"
echo " API: http://localhost/api"
echo " Analytics: http://localhost/analytics"
echo ""
echo "🔒 All internal service ports are disabled (no direct access)"
;;
stop)
docker compose -f docker/docker-compose.full.yml down
echo "✅ Production stopped"
;;
build-test)
echo "🔨 Building test images with PostHog analytics..."
if [ -z "${POSTHOG_API_KEY:-}" ] || [ -z "${POSTHOG_HOST:-}" ]; then
echo "❌ POSTHOG_API_KEY and POSTHOG_HOST must be set in your environment for this command"
exit 1
fi
# Build with PostHog keys (debug version - non-minified)
DOCKER_BUILDKIT=1 docker build \
--target frontend-debug \
--build-arg VITE_PUBLIC_POSTHOG_KEY=$POSTHOG_API_KEY \
--build-arg VITE_PUBLIC_POSTHOG_HOST=$POSTHOG_HOST \
-t ghcr.io/shipsecai/studio-frontend:latest \
.
DOCKER_BUILDKIT=1 docker build \
--target backend \
--build-arg POSTHOG_API_KEY=$POSTHOG_API_KEY \
--build-arg POSTHOG_HOST=$POSTHOG_HOST \
-t ghcr.io/shipsecai/studio-backend:latest \
.
DOCKER_BUILDKIT=1 docker build \
--target worker \
--build-arg POSTHOG_API_KEY=$POSTHOG_API_KEY \
--build-arg POSTHOG_HOST=$POSTHOG_HOST \
-t ghcr.io/shipsecai/studio-worker:latest \
.
echo "✅ Test images built with PostHog analytics"
echo " Run: just prod-images start"
;;
logs)
docker compose -f docker/docker-compose.full.yml logs -f
;;
status)
docker compose -f docker/docker-compose.full.yml ps
;;
clean)
docker compose -f docker/docker-compose.full.yml down -v
docker system prune -f
echo "✅ Production cleaned"
;;
*)
echo "Usage: just prod-images [start|stop|build-test|logs|status|clean]"
;;
esac
# Generate TLS certificates for production
generate-certs:
#!/usr/bin/env bash
set -euo pipefail
echo "🔐 Generating TLS certificates..."
chmod +x docker/scripts/generate-certs.sh
docker/scripts/generate-certs.sh
echo ""
echo "✅ Certificates generated in docker/certs/"
echo ""
echo "Next steps:"
echo " 1. export OPENSEARCH_ADMIN_PASSWORD='your-secure-password'"
echo " 2. export OPENSEARCH_DASHBOARDS_PASSWORD='your-secure-password'"
echo " 3. just prod"
# Initialize or reinitialize OpenSearch security index
security-init *args:
#!/usr/bin/env bash
set -euo pipefail
echo "🔐 Initializing OpenSearch Security..."
chmod +x docker/scripts/security-init.sh
docker/scripts/security-init.sh {{args}}
# Generate BCrypt password hash for OpenSearch internal users
hash-password password="":
#!/usr/bin/env bash
set -euo pipefail
chmod +x docker/scripts/hash-password.sh
if [ -n "{{password}}" ]; then
docker/scripts/hash-password.sh "{{password}}"
else
docker/scripts/hash-password.sh
fi
# === Infrastructure Only ===
# Manage infrastructure containers separately
infra action="up":
#!/usr/bin/env bash
set -euo pipefail
case "{{action}}" in
up)
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml up -d
echo "✅ Infrastructure started (Postgres, Temporal, MinIO, Redis)"
echo " All ports bound to 127.0.0.1 (localhost only)"
;;
down)
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml down
echo "✅ Infrastructure stopped"
;;
logs)
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml logs -f
;;
clean)
docker compose -f docker/docker-compose.infra.yml -f docker/docker-compose.dev-ports.yml down -v
echo "✅ Infrastructure cleaned"
;;
*)
echo "Usage: just infra [up|down|logs|clean]"
;;
esac
# === Utilities ===
# Show status of all services
status:
#!/usr/bin/env bash
set -euo pipefail
echo "📊 ShipSec Studio Status"
echo ""
echo "=== PM2 Services ==="
pm2 status 2>/dev/null || echo " (PM2 not running)"
echo ""
echo "=== Infrastructure Containers ==="
docker compose -f docker/docker-compose.infra.yml ps 2>/dev/null || echo " (Infrastructure not running)"
echo ""
echo "=== Production Containers ==="
docker compose -f docker/docker-compose.full.yml ps 2>/dev/null || echo " (Production not running)"
# Reset database (drops all data)
db-reset:
#!/usr/bin/env bash
set -euo pipefail
if ! docker ps --filter "name=shipsec-postgres" --format "{{{{.Names}}}}" | grep -q "shipsec-postgres"; then
echo "❌ PostgreSQL not running. Run: just dev" && exit 1
fi
docker exec shipsec-postgres psql -U shipsec -d postgres -c "DROP DATABASE IF EXISTS shipsec;"
docker exec shipsec-postgres psql -U shipsec -d postgres -c "CREATE DATABASE shipsec;"
bun --cwd=backend run migration:push
echo "✅ Database reset"
# Build production images without starting
build:
docker compose -f docker/docker-compose.full.yml build
echo "✅ Images built"
# === Help ===
help:
@echo "ShipSec Studio"
@echo ""
@echo "Getting Started:"
@echo " just init Set up dependencies and environment files"
@echo ""
@echo "Development (hot-reload, auto-detects auth mode):"
@echo " just dev Start dev (Clerk creds in .env → secure mode, otherwise local auth)"
@echo " just dev stop Stop everything"
@echo " just dev logs View application logs"
@echo " just dev status Check service status"
@echo " just dev clean Stop and remove all data"
@echo ""
@echo "Production (Docker, auto-detects security mode):"
@echo " just prod Start prod (TLS certs present → secure mode, otherwise standard)"
@echo " just prod build Rebuild and start"
@echo " just prod start-latest Download latest release and start"
@echo " just prod stop Stop production"
@echo " just prod logs View production logs"
@echo " just prod status Check production status"
@echo " just prod clean Remove all data"
@echo ""
@echo "Security Management:"
@echo " just security-init Initialize OpenSearch security index"
@echo " just security-init --force Reinitialize (update config)"
@echo " just hash-password Generate BCrypt hash for passwords"
@echo ""
@echo "Infrastructure:"
@echo " just infra up Start infrastructure only"
@echo " just infra down Stop infrastructure"
@echo " just infra logs View infrastructure logs"
@echo " just infra clean Remove infrastructure data"
@echo ""
@echo "Utilities:"
@echo " just status Show status of all services"
@echo " just db-reset Reset database"
@echo " just build Build images only"