-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
56 lines (46 loc) · 1.77 KB
/
setup.sh
File metadata and controls
56 lines (46 loc) · 1.77 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
#!/bin/bash
# ═══════════════════════════════════════════════
# VaccTrack Setup Script
# Run this once after cloning / extracting
# ═══════════════════════════════════════════════
set -e
echo ""
echo " 💉 VaccTrack — Pediatric Vaccine Tracker"
echo " ─────────────────────────────────────────"
echo ""
# 1. Copy .env
if [ ! -f .env ]; then
cp .env.example .env
echo " ✅ .env created"
fi
# 2. Install composer dependencies
echo " 📦 Installing PHP dependencies..."
composer install --no-interaction --prefer-dist --optimize-autoloader
# 3. Generate app key
echo " 🔑 Generating application key..."
php artisan key:generate
# 4. Create SQLite database
if [ ! -f database/database.sqlite ]; then
touch database/database.sqlite
echo " 🗄️ SQLite database created"
fi
# 5. Run migrations
echo " 🏗️ Running database migrations..."
php artisan migrate --force
# 6. Seed the database
echo " 🌱 Seeding demo data..."
php artisan db:seed --force
# 7. Storage link
php artisan storage:link 2>/dev/null || true
echo ""
echo " ═══════════════════════════════════════"
echo " ✅ VaccTrack is ready!"
echo ""
echo " Run: php artisan serve"
echo " Open: http://localhost:8000"
echo ""
echo " Demo credentials:"
echo " Doctor → admin / admin"
echo " Parent → parent / parent"
echo " ═══════════════════════════════════════"
echo ""