Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Projet Symfony avec Docker

Ce projet utilise **Docker Compose** pour gérer un environnement Symfony avec une base de données.

## 📌 Prérequis

Avant de démarrer, assurez-vous d'avoir installé :

- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)

## 🚀 Installation et démarrage du projet

### 1️⃣ Copier le fichier `.env.dist` vers `.env`
Le fichier `.env` contient les variables d'environnement nécessaires au projet.

```sh
make copy-env
```

### 2️⃣ Démarrer le projet
Pour lancer le projet avec Docker :

```sh
make start
```

Cela effectuera les actions suivantes :
- Lancer les conteneurs en arrière-plan.
- Créer la base de données si elle n'existe pas.
- Appliquer les migrations.
- Charger les données de test (fixtures).

### 3️⃣ Arrêter le projet
Pour arrêter les conteneurs :

```sh
make stop
```

## 🛠 Commandes utiles

### 📖 Afficher l'aide des commandes disponibles
```sh
make help
```

### 🛡 Vérifications et corrections
- **Analyse du code avec PHPStan** :
```sh
make phpstan
```
- **Correction du code avec PHP-CS-Fixer** :
```sh
make php-cs-fixer
```
- **Exécuter les tests avec PHPSpec** :
```sh
make phpspec
```

👨‍💻 **Happy coding!**
1 change: 1 addition & 0 deletions apps/back/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"doctrine/doctrine-bundle": "^2.13",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^3.3",
"symfony/asset": "7.2.*",
"symfony/console": "7.2.*",
"symfony/dotenv": "7.2.*",
"symfony/flex": "^2",
Expand Down
71 changes: 70 additions & 1 deletion apps/back/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added apps/back/public/images/edgar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/back/public/images/logos_php_dotrine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/back/src/Application/HTTP/Controller/Home.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(
) {
}

#[Route('/', methods: ['GET'])]
#[Route('/', methods: ['GET'], name: 'course_index')]
public function __invoke(): Response
{
$courses = $this->courses->findAll();
Expand Down
3 changes: 3 additions & 0 deletions apps/back/templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{% endblock %}
</head>
<body>
<a href="{{ path('course_index') }}" class="position-absolute top-0 start-0 m-3">
<img src="{{ asset('images/edgar.jpg') }}" alt="Retour aux cours" width="150">
</a>
{% block body %}{% endblock %}
</body>
</html>
Loading