-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
Β·42 lines (35 loc) Β· 1.19 KB
/
start.sh
File metadata and controls
executable file
Β·42 lines (35 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
#!/bin/bash
echo "π Starting Authenticator TRT..."
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "β Error: Docker is not running. Please start Docker Desktop and try again."
exit 1
fi
# Check if .env.production exists
if [ ! -f .env.production ]; then
echo "π Creating .env.production from example..."
cp .env.production.example .env.production
echo "β οΈ Please edit .env.production and update ENCRYPTION_KEY and JWT_SECRET"
echo " Generate keys with: openssl rand -base64 32"
echo ""
read -p "Press Enter to continue with default keys (NOT SECURE for production)..."
fi
# Create data directory
mkdir -p data
echo "π¨ Building Docker image..."
docker-compose build
echo "π Starting container..."
docker-compose up -d
echo ""
echo "β
Authenticator TRT is running!"
echo ""
echo "π Access: http://localhost:3000"
echo "π€ Admin login: admin / admin"
echo "ποΈ Viewer login: viewer / viewer"
echo ""
echo "π Useful commands:"
echo " docker-compose logs -f # View logs"
echo " docker-compose ps # Check status"
echo " docker-compose down # Stop"
echo " docker-compose restart # Restart"
echo ""