-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·50 lines (41 loc) · 1.42 KB
/
setup.sh
File metadata and controls
executable file
·50 lines (41 loc) · 1.42 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
#!/bin/bash
# AuctoriaAI One-Command Setup Script
set -e
echo "🚀 Starting AuctoriaAI Setup..."
# Check if Docker is installed
if ! [ -x "$(command -v docker)" ]; then
echo 'Error: docker is not installed.' >&2
exit 1
fi
# Check if docker-compose is installed
if ! [ -x "$(command -v docker-compose)" ]; then
if ! docker compose version >/dev/null 2>&1; then
echo 'Error: docker-compose is not installed.' >&2
exit 1
fi
DOCKER_COMPOSE="docker compose"
else
DOCKER_COMPOSE="docker-compose"
fi
# Create .env file if it doesn't exist
if [ ! -f .env ]; then
echo "📄 Creating .env file from .env.example..."
cp .env.example .env
# Note: The docker-compose overrides the DATABASE_URL to point to the 'db' service,
# but keeping the file for other settings if needed.
fi
# Create storage directory if it doesn't exist
if [ ! -d storage/documents ]; then
echo "📁 Creating storage/documents directory..."
mkdir -p storage/documents
fi
# Build and start the containers
echo "🏗️ Building and starting containers (this may take a few minutes the first time)..."
$DOCKER_COMPOSE up --build -d
echo "✅ Setup complete!"
echo "------------------------------------------------"
echo "Backend API: http://localhost:8000"
echo "Frontend UI: http://localhost"
echo "------------------------------------------------"
echo "To view logs, run: $DOCKER_COMPOSE logs -f"
echo "To stop the project, run: $DOCKER_COMPOSE down"