-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·68 lines (57 loc) · 1.71 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·68 lines (57 loc) · 1.71 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
#!/bin/bash
# PlexGuard Setup Script
set -e
echo "🎬 PlexGuard Setup"
echo "==================="
echo ""
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "❌ Docker is not installed"
exit 1
fi
if ! command -v docker-compose &> /dev/null; then
echo "❌ Docker Compose is not installed"
exit 1
fi
# Check if .env.local exists
if [ ! -f .env.local ]; then
echo "⚠️ .env.local not found. Creating from example..."
cp .env.example .env.local
echo ""
echo "📝 IMPORTANT: Edit .env.local and add:"
echo " - Your Plex admin token"
echo " - A random secret for NEXTAUTH_SECRET"
echo " - Your domain (plexguard.williamrdodd.com)"
echo ""
exit 1
fi
# Check if required vars are set
if grep -q "your_plex_admin_token_here" .env.local || grep -q "your_random_secret_here" .env.local; then
echo "⚠️ Please update .env.local with your actual values"
exit 1
fi
echo "✅ Environment configured"
echo ""
# Create data directory
mkdir -p data
# Build and start
echo "🔨 Building PlexGuard..."
docker-compose build --no-cache
echo ""
echo "🚀 Starting PlexGuard..."
docker-compose up -d
echo ""
echo "✅ PlexGuard is running!"
echo ""
echo "📱 Access the app at:"
echo " Local: http://localhost:4600"
echo " Domain: https://plexguard.williamrdodd.com (if configured)"
echo ""
echo "📝 First-time setup:"
echo " 1. Get your Plex admin token:"
echo " https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/"
echo " 2. Sign in with your Plex token"
echo " 3. Configure users and restriction rules"
echo ""
echo "🪵 View logs: docker-compose logs -f"
echo "🛑 Stop: docker-compose down"