Throughout my life as a developer, one question kept coming up:
“Why is it so complicated to just get started?”
You know, that moment when you have a brilliant idea or want to test a new Symfony feature, but instead of diving into the code, you waste a ton of time setting up the environment. An outdated PHP version, finicky Symfony dependencies, and Docker suddenly deciding to ignore you. Frustrating, right?
One day, after spending over an hour configuring a project just to test an idea that crossed my mind, it hit me:
“We deserve better.”
Why waste so much time on details that could be automated? I wanted a way to launch a Symfony project in seconds, without worrying about versions or updates.
That’s when the idea for this project was born. Unlike other existing Symfony boilerplates, this one stands out for its simplicity and efficiency:
- It doesn’t include a pre-installed Symfony project.
- It automatically generates a brand-new instance, ready to use, always up-to-date, and perfectly tailored to your needs.
No more versioning issues or outdated dependencies, and no more copying and pasting files from another project to get started. One single command is all it takes to create a fresh, fully functional development environment. A valuable time-saver to test your ideas effortlessly.
🚀 Features
- Symfony 7.0 skeleton installation.
- PHP-FPM container for executing PHP.
- Nginx container for serving the application.
- Easy-to-use Makefile for common tasks (building, starting, stopping, and clearing cache).
- Docker Compose configuration for containerized setup.
- PHPCS: Code style enforcement.
- PHPStan: Static code analysis for finding bugs.
- PHPUnit: Unit testing framework.
🎯 Goal of the Boilerplate
When I designed this Boilerplate, I didn’t just want a tool.
I wanted an ally. Something that would save me time, be easy to use, and could be shared with as many people as possible.
Feel free to adapt it to your own needs.
The three pillars of this Boilerplate:
- Symfony: The framework.
- Docker: Because a reproducible environment is essential.
- Makefile: The cherry on top to automate commands.
The result?
A project that starts with a single command line. (Yes, just one. I counted.)
🛠️ Requirements
You must have the following installed on your local machine:
- Docker
- Docker Compose
- Make
📦 Installation
- Clone this repository:
git clone git@github.com:mb2dev/Symfony-Docker-Boilerplate.git
cd Symfony-Docker-Boilerplate
- Initialize the Symfony project:
make init
The application will be available at: http://127.0.0.1:8080/ and the Symfony code will be located in the app folder.
🔧 Available Commands
You can display all the available command with
make help
🌐 Find the Project on GitHub
💡 Feedback and Contributions
I welcome feedback, suggestions, and contributions to help improve this project! If you have an idea for a new feature, found a bug, or have any other feedback, feel free to create an issue.