]> BookStack Code Mirror - bookstack/commitdiff
Added mailhog to the docker-compose setup
authorDan Brown <redacted>
Sat, 31 Aug 2019 17:09:40 +0000 (18:09 +0100)
committerDan Brown <redacted>
Sat, 31 Aug 2019 17:09:40 +0000 (18:09 +0100)
docker-compose.yml
readme.md

index 47f38184e3cecc3e4c76f49e7a4c3abb0de95c60..ea7a61ab554aea7540a28655d0e9c61822550f8a 100644 (file)
@@ -28,6 +28,9 @@ services:
       DB_DATABASE: bookstack-test
       DB_USERNAME: bookstack-test
       DB_PASSWORD: bookstack-test
+      MAIL_DRIVER: smtp
+      MAIL_HOST: mailhog
+      MAIL_PORT: 1025
     ports:
       - ${DEV_PORT:-8080}:80
     volumes:
@@ -39,3 +42,7 @@ services:
     volumes:
       - ./:/app
     entrypoint: /app/dev/docker/entrypoint.node.sh
+  mailhog:
+    image: mailhog/mailhog
+    ports:
+      - ${DEV_MAIL_PORT:-8025}:8025
index 6f0956eb59f08426c7121a33a57bd2459d7a3ed2..2efc6b160e853acd4fc6386d44ffe80f4af175b7 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -103,6 +103,8 @@ If needed, You'll be able to run any artisan commands via docker-compose like so
 docker-compose run app php artisan list 
 ```
 
+The docker-compose setup runs an instance of [MailHog](https://github.com/mailhog/MailHog) and sets environment variables to redirect any BookStack-sent emails to MailHog. You can view this mail via the MailHog web interface on `localhost:8025`. You can change the port MailHog is accessible on by setting a `DEV_MAIL_PORT` environment variable.
+
 ## ðŸŒŽ Translations
 
 All text strings can be found in the `resources/lang` folder where each language option has its own folder. To add a new language you should copy the `en` folder to an new folder (eg. `fr` for french) then go through and translate all text strings in those files, leaving the keys and file-names intact. If a language string is missing then the `en` translation will be used. To show the language option in the user preferences language drop-down you will need to add your language to the options found at the bottom of the `resources/lang/en/settings.php` file. A system-wide language can also be set in the `.env` file like so: `APP_LANG=en`.