first commit
This commit is contained in:
94
README.md
94
README.md
@@ -0,0 +1,94 @@
|
||||
🧩 Prérequis
|
||||
|
||||
Avant de commencer, assure-toi d’avoir installé :
|
||||
|
||||
🐳 Docker Desktop
|
||||
|
||||
🧠 Un terminal (macOS/Linux) ou PowerShell (Windows)
|
||||
|
||||
Un navigateur moderne (Chrome, Firefox, Edge, Safari)
|
||||
|
||||
🛠️ Installation
|
||||
1️⃣ Cloner le projet
|
||||
git clone
|
||||
cd forum/infrastructure
|
||||
|
||||
2️⃣ Rendre le script MinIO exécutable
|
||||
chmod +x setup-minio/init-minio.sh
|
||||
|
||||
3️⃣ Construire et lancer les conteneurs
|
||||
docker compose down -v
|
||||
docker system prune -af
|
||||
docker compose up -d --build
|
||||
|
||||
🧱 Services inclus
|
||||
Service Description Port
|
||||
app Serveur PHP + Apache http://localhost:8080
|
||||
mysql Base de données MySQL 8.1 localhost:3306
|
||||
minio Stockage d’images (type AWS S3) http://localhost:9000
|
||||
minio-console Interface web MinIO http://localhost:9001
|
||||
|
||||
👤 Comptes par défaut
|
||||
Utilisateur Mot de passe Rôle Email
|
||||
admin admin admin admin@example.com
|
||||
|
||||
aya ayabmk933 user aya@example.com
|
||||
📦 Accès aux interfaces
|
||||
|
||||
🌐 CMS principal :
|
||||
👉 http://localhost:8080
|
||||
|
||||
🗄️ MinIO Console :
|
||||
👉 http://localhost:9001
|
||||
|
||||
Utilise minioadmin / minioadmin
|
||||
|
||||
📚 Explications techniques
|
||||
✅ Encodage UTF-8
|
||||
|
||||
La base MySQL est créée avec :
|
||||
|
||||
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||
|
||||
|
||||
Tous les fichiers .php incluent :
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
|
||||
La connexion PDO force SET NAMES utf8mb4;
|
||||
|
||||
👉 Résultat : aucun problème de é, ’, etc., même sur un environnement étranger.
|
||||
|
||||
✅ Bucket MinIO public
|
||||
|
||||
Le script init-minio.sh crée automatiquement le bucket public bucketforum :
|
||||
|
||||
mc mb myminio/bucketforum || true
|
||||
mc anonymous set public myminio/bucketforum
|
||||
|
||||
|
||||
Toutes les images uploadées sont directement accessibles depuis :
|
||||
|
||||
http://localhost:9000/bucketforum/nom_fichier.png
|
||||
|
||||
🔍 Commandes utiles
|
||||
Lister les conteneurs actifs :
|
||||
docker ps
|
||||
|
||||
Redémarrer uniquement l’app :
|
||||
docker compose restart app
|
||||
|
||||
Voir les logs :
|
||||
docker compose logs -f
|
||||
|
||||
Supprimer tout (remise à zéro) :
|
||||
docker compose down -v
|
||||
docker system prune -af
|
||||
|
||||
💾 Sauvegarde / Restauration base de données
|
||||
Sauvegarder :
|
||||
docker exec -it mysql_container mysqldump -umyuser -pmypassword forum_database > backup.sql
|
||||
|
||||
Restaurer :
|
||||
docker exec -i mysql_container mysql -umyuser -pmypassword forum_database < backup.sql
|
||||
|
||||
0
infrastructure/setup-mysql/my.cnf
Normal file
0
infrastructure/setup-mysql/my.cnf
Normal file
Reference in New Issue
Block a user