Skip to content

🐳 Docker stack for Symfony I PHP8 | PHP7 I Caddy I MariaDB I Supervisor I NPM I Symfony CLI

License

Notifications You must be signed in to change notification settings

Eddaoust/Docker-Symfony

Repository files navigation

🐳 Symfony Docker Stack

A complete stack for developing Symfony application.

  • Multiple PHP versions
  • Symfony CLI
  • Supervisor to run async tasks
  • MariaDB
  • Node(18) + NPM(9) for building assets
  • Composer v2
  • Maildev

Installation

Edit the .env file

Build & run the stack :

$ docker compose up -d

Connect to Shell inside webserver container :

$ docker exec -ti php-fpm /bin/bash

Install Symfony app :

$ symfony new ./ --webapp

Go to http://localhost:8080

Usage

Access to your app http://localhost:8080

Access to Maildev http://localhost:8383

Configuration

You can configure PHP, Xdebug, Vhost and supervisor in /config

To work with Maildev, you need to edit the Symfony .env :

MAILER_DSN=smtp://mail:25

Logs

You can check Caddy & Mysql logs in /logs

Check container logs :

$ docker logs -f php-fpm

Misc

Supervisor

If you want to debug if supervisor handle some tasks, just type the following in the container shell to see the process logs :

$ supervisord

Docker

Rebuild the stack :

$ docker compose up --build -d

Stop the stack :

$ docker compose down

List all containers :

$ docker ps

About

🐳 Docker stack for Symfony I PHP8 | PHP7 I Caddy I MariaDB I Supervisor I NPM I Symfony CLI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published