commit d5330c0eb0c33d88915f855b84d6cbc2ddb74b0c
Author: Fahym Bouaichi
Date: Sun Nov 2 17:57:39 2025 +0100
first commit
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..273e534
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,9 @@
+FROM php:8.2-apache
+LABEL authors="Fahym"
+
+COPY . /var/www/html
+WORKDIR /var/www/html
+
+RUN docker-php-ext-install pdo pdo_mysql
+
+EXPOSE 80
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..99b48ed
--- /dev/null
+++ b/README.md
@@ -0,0 +1,36 @@
+
+
+## Contenue du ficher
+/admin
+ ajouter.php **Ajouter un article** styleajouter.css
+ board.php **Tableau de bord** styleboard.css
+ connexion.php **Se connecter** styleco.css
+ deconexion.php **Se deconnecter**
+ modification.php **Modifier un Article** stylemodif.css
+ supprimer.php **Supprimer un article** stylesup.css
+
+/assets
+ style.css **css du index**
+
+/bdd
+ dockerfile
+ init.sql **Base de donnee**
+
+/include
+ auth.php **Fonctions d’authentification**
+ db.php **Connexion à la base de données**
+
+index.php - Page d’accueil affichant les articles récents
+article.php - Page pour afficher un article spécifique
+
+
+
+## Lancement avec docker
+ **./launch-dockers.sh**
+
+Pour ce connecter:
+
+Login : Fahym
+Mot de passe : Fahym
+
+MYSQL_ROOT_PASSWORD='12345'
\ No newline at end of file
diff --git a/admin/ajouter.php b/admin/ajouter.php
new file mode 100644
index 0000000..5e50276
--- /dev/null
+++ b/admin/ajouter.php
@@ -0,0 +1,68 @@
+prepare('INSERT INTO articles (titre, contenu, date_creation) VALUES (:titre, :contenu, :date)');
+ $stmt->execute([
+ ':titre' => $titre,
+ ':contenu' => $contenu,
+ ':date' => date('Y-m-d H:i:s'),
+ ]);
+
+
+ header('Location: board.php');
+ exit;
+ }
+}
+?>
+
+
+
+
+
+ Ajouter un article
+
+
+
+
+Ajouter un article
+
+
+
+ = htmlspecialchars($e) ?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/board.php b/admin/board.php
new file mode 100644
index 0000000..4cd5bf1
--- /dev/null
+++ b/admin/board.php
@@ -0,0 +1,69 @@
+query('SELECT * FROM articles ORDER BY date_creation DESC');
+ $articles = $stmt->fetchAll();
+?>
+
+
+
+
+
+ Tableau de Bord
+
+
+
+
+
+
+
+
+
+
+ Gestion des articles
+ Ajouter un nouvel article
+
+
+
+ Vos articles publiés
+
+
+
+
+ | ID |
+ Titre |
+ Date de création |
+ Actions |
+
+
+
+
+
+ |
+ |
+ |
+
+ Modifier
+ |
+ Supprimer
+ |
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin/connexion.php b/admin/connexion.php
new file mode 100644
index 0000000..28aed50
--- /dev/null
+++ b/admin/connexion.php
@@ -0,0 +1,34 @@
+
+
+
+
+
+ Connexion
+
+
+
+ Connexion
+
+ = $error ?>
+
+
+
diff --git a/admin/deconnexion.php b/admin/deconnexion.php
new file mode 100644
index 0000000..0a37132
--- /dev/null
+++ b/admin/deconnexion.php
@@ -0,0 +1,27 @@
+
\ No newline at end of file
diff --git a/admin/modification.php b/admin/modification.php
new file mode 100644
index 0000000..92ebfeb
--- /dev/null
+++ b/admin/modification.php
@@ -0,0 +1,88 @@
+prepare('SELECT * FROM articles WHERE id = :id');
+$stmt->execute([':id' => $id]);
+$article = $stmt->fetch();
+
+// Article est pas valide on retourne au tableau
+if (!$article) {
+ header('Location: board.php');
+ exit;
+}
+
+
+$errors = [];
+$titre = $article['titre'];
+$contenu = $article['contenu'];
+
+
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ $titre = trim($_POST['titre'] ?? '');
+ $contenu = trim($_POST['contenu'] ?? '');
+
+
+ if ($titre === '' || $contenu === '') {
+ $errors[] = 'Tous les champs sont obligatoires.';
+ } else {
+
+ $u = $pdo->prepare('UPDATE articles SET titre = :titre, contenu = :contenu WHERE id = :id');
+ $u->execute([
+ ':titre' => $titre,
+ ':contenu' => $contenu,
+ ':id' => $id
+ ]);
+
+
+ header('Location: board.php');
+ exit;
+ }
+}
+?>
+
+
+
+
+
+ Modifier l'article
+
+
+
+
+Modifier l'article
+
+
+
+ = htmlspecialchars($e) ?>
+
+
+>
+
+
+
+
\ No newline at end of file
diff --git a/admin/styleajouter.css b/admin/styleajouter.css
new file mode 100644
index 0000000..804fddc
--- /dev/null
+++ b/admin/styleajouter.css
@@ -0,0 +1,88 @@
+body {
+ font-family: Arial, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 20px;
+ background-color: #f4f4f9;
+ color: #333;
+}
+
+
+h1 {
+ color: #1e3d59;
+ border-bottom: 2px solid #aac4e0;
+ padding-bottom: 10px;
+ margin-top: 0;
+}
+
+
+form {
+ background-color: #fff;
+ padding: 20px;
+ border: 1px solid #d0dbe5;
+ border-radius: 6px;
+ max-width: 600px;
+ margin-top: 20px;
+}
+
+
+label {
+ display: block;
+ margin-bottom: 15px;
+ font-weight: bold;
+}
+
+input[type="text"],
+textarea {
+ width: 100%;
+ padding: 8px;
+ border: 1px solid #bfc9d6;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+
+
+button {
+ background-color: #2a73cc;
+ color: #fff;
+ padding: 10px 15px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 1rem;
+}
+
+button:hover {
+ background-color: #195aa7;
+}
+
+
+a {
+ margin-left: 10px;
+ color: #2a73cc;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+
+.error {
+ color: #721c24;
+ background-color: #f8d7da;
+ border: 1px solid #f5c6cb;
+ padding: 10px;
+ border-radius: 5px;
+ margin-bottom: 15px;
+}
+
+
+@media (max-width: 640px) {
+ body {
+ padding: 10px;
+ }
+ form {
+ padding: 15px;
+ }
+}
diff --git a/admin/styleboard.css b/admin/styleboard.css
new file mode 100644
index 0000000..dee340d
--- /dev/null
+++ b/admin/styleboard.css
@@ -0,0 +1,98 @@
+/* Design de toute la page*/
+body {
+ font-family: Arial, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 20px;
+ background-color: #ececec; /* gris clair pour le fond */
+ color: #333;
+}
+
+/* En-tête */
+header {
+ background-color: #555; /* gris foncé */
+ color: #fff;
+ padding: 15px;
+ border-radius: 6px;
+ margin-bottom: 20px;
+}
+
+header h1 {
+ margin: 0;
+ font-size: 1.8rem;
+}
+
+header p {
+ margin: 5px 0 0 0;
+}
+
+header a {
+ color: #cfcfcf;
+ text-decoration: none;
+}
+
+header a:hover {
+ text-decoration: underline;
+ color: #fff;
+}
+
+/* Titres */
+h2, h3 {
+ color: #333;
+ margin-top: 20px;
+}
+
+/* Lien Ajouter un article */
+a {
+ color: #555;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+/* Permet de cree des tableau */
+table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-top: 15px;
+ background-color: #fff; /* fond blanc pour contraster */
+ border-radius: 6px;
+ overflow: hidden;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+}
+
+table th, table td {
+ padding: 10px;
+ border: 1px solid #ccc;
+ text-align: left;
+}
+
+table th {
+ background-color: #bbb; /* gris moyen pour l'entête */
+ color: #fff;
+}
+
+/* Lignes de tableau */
+table tr:nth-child(even) {
+ background-color: #f2f2f2;
+}
+
+/* Actions */
+table a {
+ color: #2a73cc;
+}
+
+table a:hover {
+ color: #195aa7;
+ text-decoration: underline;
+}
+
+/* Séparateurs */
+hr {
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 20px 0;
+}
diff --git a/admin/styleco.css b/admin/styleco.css
new file mode 100644
index 0000000..0c29d18
--- /dev/null
+++ b/admin/styleco.css
@@ -0,0 +1,89 @@
+/* Styles globaux */
+body {
+ font-family: Arial, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 20px;
+ background-color: #f4f4f9; /* fond clair */
+ color: #333;
+}
+
+/* Titres */
+h1 {
+ color: #1e3d59; /* bleu foncé */
+ border-bottom: 2px solid #aac4e0;
+ padding-bottom: 10px;
+ margin-top: 0;
+}
+
+/* Formulaire */
+form {
+ background: #fff;
+ padding: 20px;
+ border-radius: 6px;
+ border: 1px solid #d0dbe5;
+ max-width: 600px;
+ margin-top: 20px;
+}
+
+/* Labels et inputs */
+label {
+ display: block;
+ margin-bottom: 15px;
+ font-weight: bold;
+}
+
+input[type="text"],
+textarea {
+ width: 100%;
+ padding: 8px;
+ border: 1px solid #bfc9d6;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+
+/* Bouton */
+button {
+ background-color: #2a73cc;
+ color: #fff;
+ padding: 10px 15px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 1rem;
+}
+
+button:hover {
+ background-color: #195aa7;
+}
+
+/* Lien annuler */
+a {
+ margin-left: 10px;
+ color: #2a73cc;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+/* Messages d'erreur */
+.error {
+ color: #721c24;
+ background: #f8d7da;
+ border: 1px solid #f5c6cb;
+ padding: 10px;
+ border-radius: 5px;
+ margin-bottom: 15px;
+}
+
+/* Responsive */
+@media (max-width: 640px) {
+ body {
+ padding: 10px;
+ }
+ form {
+ padding: 15px;
+ }
+}
diff --git a/admin/stylemodif.css b/admin/stylemodif.css
new file mode 100644
index 0000000..694187f
--- /dev/null
+++ b/admin/stylemodif.css
@@ -0,0 +1,111 @@
+/* Styles globaux */
+body {
+ font-family: Arial, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 20px;
+ background-color: #ececec; /* gris clair */
+ color: #333;
+}
+
+/* Header */
+header {
+ background-color: #555; /* gris foncé */
+ color: #fff;
+ padding: 15px;
+ border-radius: 6px;
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+header h1 {
+ margin: 0;
+ font-size: 1.8rem;
+}
+
+header p {
+ margin: 5px 0 0 0;
+}
+
+header a {
+ color: #cfcfcf;
+ text-decoration: none;
+}
+
+header a:hover {
+ color: #fff;
+ text-decoration: underline;
+}
+
+/* Titres */
+h1, h2, h3 {
+ color: #333;
+ margin-top: 20px;
+}
+
+/* Formulaire de modification */
+form {
+ background-color: #fff;
+ padding: 20px;
+ border: 1px solid #ccc;
+ border-radius: 6px;
+ max-width: 600px;
+ margin-top: 20px;
+}
+
+label {
+ display: block;
+ margin-bottom: 15px;
+ font-weight: bold;
+}
+
+input[type="text"],
+textarea {
+ width: 100%;
+ padding: 8px;
+ border: 1px solid #bfc9d6;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+
+/* Boutons */
+button {
+ background-color: #555; /* gris foncé uniforme */
+ color: #fff;
+ padding: 10px 15px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+button:hover {
+ background-color: #333;
+}
+
+/* Liens annuler */
+a {
+ color: #555;
+ text-decoration: none;
+ margin-left: 10px;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+/* Messages d'erreur */
+.error {
+ color: #721c24;
+ background-color: #f8d7da;
+ border: 1px solid #f5c6cb;
+ padding: 10px;
+ border-radius: 5px;
+ margin-bottom: 15px;
+}
+
+/* Séparateurs */
+hr {
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 20px 0;
+}
\ No newline at end of file
diff --git a/admin/stylesup.css b/admin/stylesup.css
new file mode 100644
index 0000000..f475e04
--- /dev/null
+++ b/admin/stylesup.css
@@ -0,0 +1,98 @@
+/* Styles de toute la page */
+body {
+ font-family: Arial, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 20px;
+ background-color: #ececec; /* gris clair */
+ color: #333;
+}
+
+/* La Tete */
+header {
+ background-color: #555; /* gris foncé */
+ color: #fff;
+ padding: 15px;
+ border-radius: 6px;
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+header h1 {
+ margin: 0;
+ font-size: 1.8rem;
+}
+
+header p {
+ margin: 5px 0 0 0;
+}
+
+header a {
+ color: #cfcfcf;
+ text-decoration: none;
+}
+
+header a:hover {
+ color: #fff;
+ text-decoration: underline;
+}
+
+/* Titres */
+h1, h2, h3 {
+ color: #333;
+ margin-top: 20px;
+}
+
+form {
+ background-color: #fff;
+ padding: 20px;
+ border: 1px solid #ccc;
+ border-radius: 6px;
+ max-width: 400px;
+ margin-top: 20px;
+}
+
+button {
+ background-color: #555; /* gris foncé uniforme */
+ color: #fff;
+ padding: 10px 15px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+button:hover {
+ background-color: #333;
+}
+
+/* Lien annuler */
+a {
+ color: #555;
+ text-decoration: none;
+ margin-left: 10px;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+
+.error {
+ color: #721c24;
+ background-color: #f8d7da;
+ border: 1px solid #f5c6cb;
+ padding: 10px;
+ border-radius: 5px;
+ margin-bottom: 15px;
+}
+
+
+hr {
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 20px 0;
+}
+
+strong {
+ color: #222;
+}
diff --git a/admin/supprimer.php b/admin/supprimer.php
new file mode 100644
index 0000000..f6a5a0c
--- /dev/null
+++ b/admin/supprimer.php
@@ -0,0 +1,64 @@
+prepare('SELECT id, titre FROM articles WHERE id = :id');
+$stmt->execute([':id' => $id]);
+$article = $stmt->fetch();
+
+
+if (!$article) {
+ header('Location: board.php');
+ exit;
+}
+
+
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ if (isset($_POST['confirm']) && $_POST['confirm'] === 'yes') {
+
+ $d = $pdo->prepare('DELETE FROM articles WHERE id = :id');
+ $d->execute([':id' => $id]);
+ }
+
+
+ header('Location: board.php');
+ exit;
+}
+?>
+
+
+
+
+
+ Supprimer l'article
+
+
+
+
+Supprimer l'article
+
+
+Êtes-vous sûr de vouloir supprimer : = htmlspecialchars($article['titre']) ?> ?
+
+
+
+
+
+
\ No newline at end of file
diff --git a/article.php b/article.php
new file mode 100644
index 0000000..2041bcb
--- /dev/null
+++ b/article.php
@@ -0,0 +1,38 @@
+prepare($sql);
+$req->execute([$id]);
+$article = $req->fetch();
+
+if (!$article) {
+ echo "404 - Article introuvable
";
+ exit();
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ← Retour à l'accueil
+
+
+
\ No newline at end of file
diff --git a/assets/style.css b/assets/style.css
new file mode 100644
index 0000000..dc962b8
--- /dev/null
+++ b/assets/style.css
@@ -0,0 +1,165 @@
+body {
+ font-family: Arial, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 20px;
+ background-color: #ececec; /* gris clair */
+ color: #333;
+}
+
+/* Header */
+header {
+ background-color: #555; /* gris foncé */
+ color: #fff;
+ padding: 15px;
+ border-radius: 6px;
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+header h1 {
+ margin: 0;
+ font-size: 1.8rem;
+}
+
+header p {
+ margin: 5px 0 0 0;
+}
+
+header a {
+ color: #cfcfcf;
+ text-decoration: none;
+}
+
+header a:hover {
+ color: #fff;
+ text-decoration: underline;
+}
+
+/* Titres */
+h1, h2, h3 {
+ color: #333;
+ margin-top: 20px;
+}
+
+/* Articles */
+article {
+ background: #fff;
+ padding: 20px;
+ margin-bottom: 15px;
+ border: 1px solid #ccc;
+ border-radius: 6px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.08);
+}
+
+article h2 a {
+ color: #555;
+ text-decoration: none;
+}
+
+article h2 a:hover {
+ color: #333;
+ text-decoration: underline;
+}
+
+/* Tables */
+table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-top: 20px;
+ background-color: #fff;
+ border-radius: 6px;
+ overflow: hidden;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+}
+
+table th, table td {
+ padding: 10px;
+ border: 1px solid #ccc;
+ text-align: left;
+}
+
+table th {
+ background-color: #bbb; /* gris moyen pour entête */
+ color: #fff;
+}
+
+table tr:nth-child(even) {
+ background-color: #f2f2f2;
+}
+
+table a {
+ color: #555;
+}
+
+table a:hover {
+ color: #333;
+ text-decoration: underline;
+}
+
+/* Formulaires */
+form {
+ background-color: #fff;
+ padding: 20px;
+ border: 1px solid #ccc;
+ border-radius: 6px;
+ max-width: 600px;
+ margin-top: 20px;
+}
+
+label {
+ display: block;
+ margin-bottom: 15px;
+ font-weight: bold;
+}
+
+input[type="text"],
+textarea {
+ width: 100%;
+ padding: 8px;
+ border: 1px solid #bfc9d6;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+
+/* Boutons */
+button {
+ background-color: #555; /* gris foncé uniforme */
+ color: #fff;
+ padding: 10px 15px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+button:hover {
+ background-color: #333;
+}
+
+/* Liens annuler */
+a {
+ color: #555;
+ text-decoration: none;
+ margin-left: 10px;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+/* Messages d'erreur */
+.error {
+ color: #721c24;
+ background-color: #f8d7da;
+ border: 1px solid #f5c6cb;
+ padding: 10px;
+ border-radius: 5px;
+ margin-bottom: 15px;
+}
+
+/* Séparateurs */
+hr {
+ border: 0;
+ border-top: 1px solid #ccc;
+ margin: 20px 0;
+}
\ No newline at end of file
diff --git a/bdd/Dockerfile b/bdd/Dockerfile
new file mode 100644
index 0000000..137643c
--- /dev/null
+++ b/bdd/Dockerfile
@@ -0,0 +1,8 @@
+FROM mysql
+LABEL authors="Fahym"
+
+ENV MYSQL_ROOT_PASSWORD='12345'
+
+COPY ./init.sql /docker-entrypoint-initdb.d/
+
+EXPOSE 3306
\ No newline at end of file
diff --git a/bdd/init.sql b/bdd/init.sql
new file mode 100644
index 0000000..33b1b4f
--- /dev/null
+++ b/bdd/init.sql
@@ -0,0 +1,23 @@
+CREATE DATABASE IF NOT EXISTS my_sql_CMS CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+
+USE my_sql_CMS;
+
+-- Cree une classe utilisateur
+CREATE TABLE utilisateur (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ login VARCHAR(50) UNIQUE NOT NULL,
+ password VARCHAR(255) NOT NULL
+);
+
+-- Cree une classe article
+CREATE TABLE articles (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ titre VARCHAR(255) NOT NULL,
+ contenu TEXT NOT NULL,
+ date_creation DATETIME DEFAULT CURRENT_TIMESTAMP
+);
+
+-- Insert une valeur dans utilisateur
+INSERT INTO utilisateur (login, password)
+VALUES ('Fahym', '$2y$10$r8k200T71R2bLOFFQlZ1CuRuWg1Ah64UT/77BLTjN737ywZEWtKLu');
diff --git a/include/auth.php b/include/auth.php
new file mode 100644
index 0000000..66f43b1
--- /dev/null
+++ b/include/auth.php
@@ -0,0 +1,33 @@
+prepare('SELECT * FROM utilisateur WHERE login = ?');
+ $stmt->execute([$login]);
+ $user = $stmt->fetch();
+
+
+ if ($user && password_verify($password, $user['password'])) {
+ $_SESSION['user'] = $user['login'];
+ return true;
+ }
+
+ return false;
+}
+
+
+function requireLogin() {
+ if (!isLogged()) {
+ header('Location: connexion.php');
+ exit;
+ }
+}
+?>
diff --git a/include/db.php b/include/db.php
new file mode 100644
index 0000000..3823d22
--- /dev/null
+++ b/include/db.php
@@ -0,0 +1,22 @@
+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+} catch (PDOException $e) {
+
+ echo "Erreur de connexion à la base de données : " . $e->getMessage();
+ exit();
+}
+?>
\ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..77de089
--- /dev/null
+++ b/index.php
@@ -0,0 +1,50 @@
+query($sql);
+$articles = $result->fetchAll();
+?>
+
+
+
+
+
+
+ Accueil - Un CMS Quoi
+
+
+
+
+
+
+
+ Articles Publiés
+
+ Aucun article trouvé pour le moment.
";
+ } else {
+ foreach ($articles as $a) {
+ echo "";
+ echo "";
+ echo "Publie le " . date("d/m/Y", strtotime($a['date_creation'])) . "";
+ echo "" . substr(htmlspecialchars($a['contenu']), 0, 200) . "...
";
+ echo "Lire la suite
";
+ echo "";
+ }
+ }
+ ?>
+
+
+
+
+
+
diff --git a/launch-dockers.sh b/launch-dockers.sh
new file mode 100644
index 0000000..fc34eb6
--- /dev/null
+++ b/launch-dockers.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+docker stop UnCMS
+
+docker stop CMS_php
+
+docker rm UnCMS
+
+docker rm CMS_php
+
+docker network rm CMS-bridge
+
+docker network create -d bridge CMS-bridge
+
+cd bdd
+
+docker build -t cms_mysql .
+
+docker run -d --name UnCMS -p 3306:3306 --network=CMS-bridge cms_mysql:latest
+
+cd ..
+
+docker build -t cms_php .
+
+docker run -d --name CMS_php -p 8080:80 --network=CMS-bridge cms_php:latest