/docker-symfony

Develop a Symfony App using Docker & docker-compose

Primary LanguageDockerfileMIT LicenseMIT

docker-symfony

This is my basic docker stack for developing Symfony-Apps.

Installation

You'll need either the Symfony Binary or Composer installed.

$ git clone https://github.com/arkste/docker-symfony.git
$ cd docker-symfony
$ symfony new --full Source // or "composer create-project symfony/website-skeleton Source"
$ docker network create proxy
$ docker compose up -d

then update your system host file:

echo "127.0.0.1 symfony.local db.symfony.local mail.symfony.local traefik.symfony.local" | sudo tee -a /etc/hosts

then go to http://symfony.local

FAQ

  • Why a (big) custom PHP Image? Because most of my servers are running Ubuntu with PHP built by ondrej/php and i want to be as close as possible to the target system while developing. The PHP-Container has the recent Node.js- + Yarn-Version installed, which is necessary if you're using Symfony's Webpack Encore.

  • Why is X missing? You're free to customize it for your needs. Like adding Redis, RabbitMQ, etc.