symfony-sail
symfony-sail copied to clipboard
An easy to use Docker development and production environment for Symfony 4/5/6 projects, zero-config and fully customizable.
Symfony Sail
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.
💫 Key features
- ✅ Zero-config yet fully customizable
- ✅ Use the
.env.localfile you are already familiar with - ✅ Visual Studio Code dev container, opinionated settings and extensions
- ✅ MariaDB, automatic Doctrine
DATABASE_URLparsing, 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!
⚡ Quick start
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_URLin.env.localmeans passwordless root access.
- Extract the archive into a new folder
- Create an empty
.env.localfile 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 installand optionallycomposer require webapp - Proceed configuring Visual Studio Code
If you want to dockerize your existing project:
Note: make sure your existing
DATABASE_URLin.env.localboth "mysql://" and "db:3306".
- Extract the archive into the project's root folder
- Double-check for any overwritten files
- Edit your existing
.env.localfile and configure the environment - Open the project in the Dev Container
- Proceed configuring Visual Studio Code
Your website is already available at http://localhost 🎉
📖 Documentation
- Configuration
- FAQ
- Configuring Visual Studio Code
- Going to production
❤️ Contributing
All types of contributions are encouraged and valued. See the contributing guidelines, the community looks forward to your contributions!
📘 License
Symfony Sail is released under the terms of the ISC License.
