An easy to use Docker development and production environment for Symfony 4/5/6 projects, zero-config yet fully customizable.
Key features • Quick start • Documentation • Contributing • License
This project is inspired by dunglas/symfony-docker, but it aims to be more customizable (while remaining zero-config) and enhance the developer experience. It includes support for Visual Studio Code Dev Containers, MariaDB and Webpack Encore/Vite.
Warning: this project is still under development, please use it for testing purposes and feel free to suggest changes and improvements.
- ✅ Zero-config yet fully customizable
- ✅ Use the
.env.local
file you are already familiar with - ✅ Visual Studio Code dev container, opinionated settings and extensions
- ✅ MariaDB, automatic Doctrine
DATABASE_URL
parsing, migrations support - ✅ Caddy web server, automatic HTTPS and www to non-www redirection, HTTP/2, Vulcain support
- ✅ Webpack Encore and Vite support
- ✅ PHP OPcache preloading support
- ✅ Docker pre-built multi-platform images for faster startup
Versions without database, production configuration and Visual Studio Code settings and extensions are also available!
The only requirements are Docker Desktop and Visual Studio Code with the Dev Containers extension installed.
👇 Grab the latest release! 👇
Warning: use release links and DO NOT clone this repository and use it directly as it is not intended to be used that way.
Release | Database | Production configuration | VSCode configuration |
---|---|---|---|
symfony-sail.zip | ✅ | ✅ | ✅ |
symfony-sail-v.zip | ✅ | ✅ | ❌ |
symfony-sail-p.zip | ✅ | ❌ | ✅ |
symfony-sail-pv.zip | ✅ | ❌ | ❌ |
symfony-sail-d.zip | ❌ | ✅ | ✅ |
symfony-sail-dv.zip | ❌ | ✅ | ❌ |
symfony-sail-dp.zip | ❌ | ❌ | ✅ |
symfony-sail-dpv.zip | ❌ | ❌ | ❌ |
Want to start developing a brand-new Symfony project?
Note: during development, leaving an empty
DATABASE_URL
in.env.local
means passwordless root access.
- Extract the archive into a new folder
- Create an empty
.env.local
file and configure the environment - Open the project in the Dev Container
- Execute
curl -O https://raw.githubusercontent.com/symfony/skeleton/6.3/composer.json
- Execute
composer install
and optionallycomposer require webapp
- Proceed configuring Visual Studio Code
If you want to dockerize your existing project:
Note: make sure your existing
DATABASE_URL
in.env.local
both "mysql://" and "db:3306".
- Extract the archive into the project's root folder
- Double-check for any overwritten files
- Edit your existing
.env.local
file and configure the environment - Open the project in the Dev Container
- Proceed configuring Visual Studio Code
Your website is already available at http://localhost 🎉
All types of contributions are encouraged and valued. See the contributing guidelines, the community looks forward to your contributions!
Symfony Sail is released under the terms of the ISC License.