Browse Source

Merge branch 'torhoehn-feature/mailhog'

Mark Shust 6 năm trước cách đây
mục cha
commit
b5ef4238c0

+ 5 - 0
CHANGELOG.md

@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 - N/A
 
+## [23.2.0] - 2019-07-07
+
+### Added
+- View emails sent locally through Mailhog by visiting [http://{yourdomain}:8025](http://{yourdomain}:8025)
+
 ## [23.1.1] - 2019-07-01
 
 ### Updated

+ 8 - 2
README.md

@@ -46,10 +46,12 @@ View Dockerfiles:
       - [`1.13-0`](https://github.com/markshust/docker-magento/tree/11.0.0/images/nginx/1.13)
 - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/)
   - 7.2
-      - [`latest`, `7.2-fpm`, `7.2-fpm-1`](https://github.com/markshust/docker-magento/tree/master/images/php/7.2)
+      - [`latest`, `7.2-fpm`, `7.2-fpm-2`](https://github.com/markshust/docker-magento/tree/master/images/php/7.2)
+      - [`7.2-fpm-1`](https://github.com/markshust/docker-magento/tree/23.1.1/images/php/7.2)
       - [`7.2-fpm-0`](https://github.com/markshust/docker-magento/tree/23.0.0/images/php/7.2)
   - 7.1
-      - [`7.1-fpm`, `7.1-fpm-10`](https://github.com/markshust/docker-magento/tree/master/images/php/7.1)
+      - [`7.1-fpm`, `7.1-fpm-11`](https://github.com/markshust/docker-magento/tree/master/images/php/7.1)
+      - [`7.1-fpm-10`](https://github.com/markshust/docker-magento/tree/23.1.1/images/php/7.1)
       - [`7.1-fpm-9`](https://github.com/markshust/docker-magento/tree/23.0.0/images/php/7.1)
       - [`7.1-fpm-8`](https://github.com/markshust/docker-magento/tree/17.0.1/images/php/7.1)
       - [`7.1-fpm-7`](https://github.com/markshust/docker-magento/tree/16.2.0/images/php/7.1)
@@ -223,6 +225,10 @@ First setup Magento Marketplace authentication (details in the [DevDocs](http://
 
 Copy `src/auth.json.sample` to `src/auth.json`. Then, update the username and password values with your Magento public and private keys, respectively. Finally, copy the file to the container by running `bin/copytocontainer auth.json`.
 
+### Email / Mailhog
+
+View emails sent locally through Mailhog by visiting [http://{yourdomain}:8025](http://{yourdomain}:8025)
+
 ### Redis
 
 Redis is now the default cache and session storage engine, and is automatically configured & enabled when running `bin/setup` on new installs.

+ 7 - 1
compose/magento-2/docker-compose.dev.yml

@@ -1,5 +1,5 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento)
-# Version 23.0.0
+# Version 23.2.0
 
 version: "3"
 
@@ -23,6 +23,12 @@ services:
     #extra_hosts:
     #  - "host.docker.internal:IP"
 
+  mailhog:
+    image: mailhog/mailhog
+    ports:
+      - "1025"
+      - "8025:8025"
+
   # Disabling cron by default as it uses higher CPU, enable if needed
   #cron:
   #  volumes: *appvolumes

+ 3 - 3
compose/magento-2/docker-compose.yml

@@ -1,5 +1,5 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento)
-# Version 23.0.0
+# Version 23.2.0
 
 version: "3"
 
@@ -18,7 +18,7 @@ services:
       - sockdata:/sock
 
   phpfpm:
-    image: markoshust/magento-php:7.2-fpm-1
+    image: markoshust/magento-php:7.2-fpm-2
     links:
       - db
     volumes: *appvolumes
@@ -42,7 +42,7 @@ services:
 
   # Disabling cron by default as it uses higher CPU, enable if needed
   #cron:
-  #  image: markoshust/magento-php:7.2-fpm-1
+  #  image: markoshust/magento-php:7.2-fpm-2
   #  user: root
   #  command: /usr/local/bin/cronstart
   #  tty: true

+ 4 - 0
images/php/7.1/Dockerfile

@@ -61,6 +61,10 @@ RUN apt-get install -y gnupg \
   && chown app:app /var/www/.config /var/www/.npm \
   && ln -s /var/www/html/node_modules/grunt/bin/grunt /usr/bin/grunt
 
+RUN curl -sSLO https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
+  && chmod +x mhsendmail_linux_amd64 \
+  && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
+
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n' >> /etc/crontab
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n' >> /etc/crontab
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#\n' >> /etc/crontab

+ 2 - 0
images/php/7.1/conf/php.ini

@@ -11,3 +11,5 @@ xdebug.remote_port = 9001
 
 upload_max_filesize = 20M
 post_max_size = 20M
+
+sendmail_path = "/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025"

+ 4 - 0
images/php/7.2/Dockerfile

@@ -59,6 +59,10 @@ RUN apt-get install -y gnupg \
   && chown app:app /var/www/.config /var/www/.npm \
   && ln -s /var/www/html/node_modules/grunt/bin/grunt /usr/bin/grunt
 
+RUN curl -sSLO https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
+  && chmod +x mhsendmail_linux_amd64 \
+  && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail
+
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n' >> /etc/crontab
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n' >> /etc/crontab
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#\n' >> /etc/crontab

+ 2 - 0
images/php/7.2/conf/php.ini

@@ -11,3 +11,5 @@ xdebug.remote_port = 9001
 
 upload_max_filesize = 20M
 post_max_size = 20M
+
+sendmail_path = "/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025"