-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun-standalone.sh
More file actions
executable file
·48 lines (41 loc) · 1.56 KB
/
run-standalone.sh
File metadata and controls
executable file
·48 lines (41 loc) · 1.56 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
#!/bin/bash
# FilesAPI Standalone Runner
# Self-contained deployment with no external dependencies
echo "🚀 Starting FilesAPI in standalone mode..."
echo "📦 This version uses embedded LiteDB database"
echo "🔧 No external MongoDB required!"
echo ""
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "❌ Docker is not running. Please start Docker and try again."
exit 1
fi
# Build and run the standalone version
echo "🔨 Building FilesAPI container..."
docker-compose -f docker-compose.standalone.yml build
echo "🏃 Starting FilesAPI..."
docker-compose -f docker-compose.standalone.yml up -d
# Wait for the service to be ready
echo "⏳ Waiting for FilesAPI to be ready..."
sleep 10
# Check if the service is healthy
if curl -f http://localhost:5100/health > /dev/null 2>&1; then
echo ""
echo "✅ FilesAPI is running successfully!"
echo ""
echo "🌐 Access points:"
echo " • API: http://localhost:5100"
echo " • Swagger UI: http://localhost:5100/swagger"
echo " • Health Check: http://localhost:5100/health"
echo ""
echo "📁 Data is persisted in Docker volumes:"
echo " • Database: filesapi_data"
echo " • Uploads: filesapi_uploads"
echo " • Logs: filesapi_logs"
echo ""
echo "🛑 To stop: docker-compose -f docker-compose.standalone.yml down"
echo "🗑️ To reset: docker-compose -f docker-compose.standalone.yml down -v"
else
echo "❌ FilesAPI failed to start properly. Check logs:"
echo " docker-compose -f docker-compose.standalone.yml logs"
fi