-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocal-debug-run.sh
More file actions
executable file
·44 lines (37 loc) · 1.19 KB
/
Copy pathlocal-debug-run.sh
File metadata and controls
executable file
·44 lines (37 loc) · 1.19 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
#!/bin/bash
set -e
echo "=========================================="
echo "BeanRatio Local Debug - Run Server"
echo "=========================================="
echo ""
# Install dependencies
echo "[1/3] Installing dependencies..."
uv pip install boto3 moto requests 2>&1 | grep -v "^Resolved" | grep -v "^Prepared" || true
echo " ✓ Dependencies installed"
# Check LocalStack
echo "[2/3] Checking LocalStack..."
if ! docker ps --format '{{.Names}}' | grep -q "localstack"; then
echo " ℹ LocalStack not running. Starting..."
docker run -d \
--name localstack \
-p 4566:4566 \
-e SERVICES=s3 \
-e DEBUG=0 \
localstack/localstack:latest
sleep 5
echo " ✓ LocalStack started"
else
echo " ✓ LocalStack already running"
fi
# Create S3 bucket
echo "[3/3] Setting up S3 bucket..."
aws s3 mb s3://beanratio-data \
--endpoint-url http://localhost:4566 \
--region ap-northeast-1 2>/dev/null || echo " ℹ Bucket already exists"
echo " ✓ S3 bucket ready"
echo ""
echo "=========================================="
echo "Starting Local Test Server..."
echo "=========================================="
echo ""
uv run python3 local-test-server.py