Skip to content

An easy to use Docker development and production environment for Symfony 4/5/6 projects, zero-config and fully customizable.

License

Notifications You must be signed in to change notification settings

gremo/symfony-sail

Repository files navigation

Logo

Symfony Sail

GitHub Release Date GitHub last commit GitHub issues GitHub pull requests GitHub license

An easy to use Docker development and production environment for Symfony 4/5/6 projects, zero-config yet fully customizable.

Key featuresQuick startDocumentationContributingLicense

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.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!

⚡ 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_URL in .env.local means passwordless root access.

  1. Extract the archive into a new folder
  2. Create an empty .env.local file and configure the environment
  3. Open the project in the Dev Container
  4. Execute curl -O https://raw.githubusercontent.com/symfony/skeleton/6.3/composer.json
  5. Execute composer install and optionally composer require webapp
  6. 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".

  1. Extract the archive into the project's root folder
  2. Double-check for any overwritten files
  3. Edit your existing .env.local file and configure the environment
  4. Open the project in the Dev Container
  5. Proceed configuring Visual Studio Code

Your website is already available at http://localhost 🎉

📖 Documentation

❤️ 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.

About

An easy to use Docker development and production environment for Symfony 4/5/6 projects, zero-config and fully customizable.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks