diff --git a/.env b/.env index bc495ad..d3471c8 100644 --- a/.env +++ b/.env @@ -37,5 +37,5 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 ###< symfony/messenger ### ###> symfony/mailer ### -# MAILER_DSN=null://null +MAILER_DSN=smtp://mailer:1025 ###< symfony/mailer ### diff --git a/README.md b/README.md index 96e738d..9a51f17 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ * The JSON extension must be enabled * The Ctype extension must be enabled * The date.timezone parameter must be defined in php.ini +* Docker & Docker-compose More information on [symfony website](https://symfony.com/doc/6.2/reference/requirements.html). @@ -17,11 +18,9 @@ Messenger provides a message bus with the ability to send messages and then hand Command lines: ```bash -# clone current repot composer install # (optional) Copy and edit configuration values ".env.local" -# Edit "MAILER_DSN" in .env.local with SMTP service (example: mailtrap) php bin/console doctrine:database:create php bin/console doctrine:migrations:migrate -n @@ -33,12 +32,18 @@ php bin/console doctrine:fixtures:load -n Just execute this command to run the built-in web server _(require [symfony installer](https://symfony.com/download))_ and access the application in your browser at : ```bash +docker-compose up -d symfony server:start # Launch Messages service symfony console messenger:consume async + +# For stop services +docker-compose stop && symfony server:stop ``` +For look at emails send by the smtp service, look at this url (maildev). + Debug commands: ```shell diff --git a/docker-compose.override.yml b/docker-compose.override.yml deleted file mode 100644 index 70c043b..0000000 --- a/docker-compose.override.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '3' - -services: -###> symfony/mailer ### - mailer: - image: schickling/mailcatcher - ports: ["1025", "1080"] -###< symfony/mailer ### diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7490a01 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3.6' +services: + mailer: + image: maildev/maildev + ports: + - "1080:1080" + - "1025:1025" \ No newline at end of file diff --git a/templates/base.html.twig b/templates/base.html.twig index b72f224..2f596e1 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -15,6 +15,7 @@