-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
35 lines (28 loc) · 915 Bytes
/
Copy pathinstall.sh
File metadata and controls
35 lines (28 loc) · 915 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
echo "=== Installing AutoStack ==="
if ! command -v docker &> /dev/null; then
echo "Docker is required but not installed. Please install Docker first."
exit 1
fi
if ! command -v docker-compose &> /dev/null && ! docker compose version &> /dev/null; then
echo "Docker Compose is required but not installed."
exit 1
fi
if [ ! -f .env ]; then
if [ -f .env.example ]; then
cp .env.example .env
echo "Created .env from .env.example. Please review and set real values before production use."
else
echo "No .env.example found; creating empty .env"
touch .env
fi
fi
echo "Building and starting AutoStack on port 8080..."
if docker compose version &> /dev/null; then
docker compose up --build -d
else
docker-compose up --build -d
fi
echo "AutoStack installed. Access: http://localhost:8080"