Repository navigation
Expand file tree
/
Copy pathinstall.ps1
More file actions
78 lines (66 loc) · 3.02 KB
/
Copy pathinstall.ps1
File metadata and controls
78 lines (66 loc) · 3.02 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
69
70
71
72
73
74
75
76
77
78
# Script d'installation T-Express
# Utilisation: .\install.ps1
Write-Host "================================" -ForegroundColor Cyan
Write-Host " T-Express - Installation" -ForegroundColor Cyan
Write-Host "================================" -ForegroundColor Cyan
Write-Host ""
# Vérifier si nous sommes dans le bon dossier
if (-not (Test-Path ".\T-Express-backend") -or -not (Test-Path ".\T-Express-Frontend")) {
Write-Host "ERREUR: Ce script doit être exécuté depuis le dossier parent" -ForegroundColor Red
exit 1
}
# Backend
Write-Host "📦 Installation du Backend (Laravel)..." -ForegroundColor Green
Set-Location "T-Express-backend"
if (-not (Test-Path ".env")) {
Write-Host " Copie de .env.example vers .env..." -ForegroundColor Yellow
Copy-Item ".env.example" ".env"
}
Write-Host " Installation des dépendances Composer..." -ForegroundColor Yellow
composer install
Write-Host " Génération de la clé d'application..." -ForegroundColor Yellow
php artisan key:generate
Write-Host " ✅ Backend installé !" -ForegroundColor Green
Write-Host ""
# Frontend
Set-Location ".."
Write-Host "📦 Installation du Frontend (Next.js)..." -ForegroundColor Green
Set-Location "T-Express-Frontend"
if (-not (Test-Path ".env.local")) {
Write-Host " Copie de .env.example vers .env.local..." -ForegroundColor Yellow
Copy-Item ".env.example" ".env.local"
}
Write-Host " Installation des dépendances npm..." -ForegroundColor Yellow
npm install
Write-Host " ✅ Frontend installé !" -ForegroundColor Green
Write-Host ""
# Instructions finales
Set-Location ".."
Write-Host "================================" -ForegroundColor Green
Write-Host " Installation terminée !" -ForegroundColor Green
Write-Host "================================" -ForegroundColor Green
Write-Host ""
Write-Host "📝 Prochaines étapes:" -ForegroundColor Cyan
Write-Host ""
Write-Host "1. Configurer la base de données:" -ForegroundColor Yellow
Write-Host " - Éditer T-Express-backend\.env" -ForegroundColor White
Write-Host " - Définir DB_DATABASE, DB_USERNAME, DB_PASSWORD" -ForegroundColor White
Write-Host ""
Write-Host "2. Créer la base de données MySQL:" -ForegroundColor Yellow
Write-Host " mysql -u root -p" -ForegroundColor White
Write-Host " CREATE DATABASE t_express;" -ForegroundColor White
Write-Host " exit;" -ForegroundColor White
Write-Host ""
Write-Host "3. Lancer les migrations:" -ForegroundColor Yellow
Write-Host " cd T-Express-backend" -ForegroundColor White
Write-Host " php artisan migrate" -ForegroundColor White
Write-Host " php artisan storage:link" -ForegroundColor White
Write-Host ""
Write-Host "4. Démarrer les serveurs:" -ForegroundColor Yellow
Write-Host " .\start-project.ps1" -ForegroundColor White
Write-Host ""
Write-Host "📚 Documentation:" -ForegroundColor Cyan
Write-Host " - T-Express-Frontend\QUICKSTART.md" -ForegroundColor White
Write-Host " - T-Express-Frontend\INTEGRATION.md" -ForegroundColor White
Write-Host " - T-Express-backend\API_DOCUMENTATION.md" -ForegroundColor White
Write-Host ""