magento2-dockergento icon indicating copy to clipboard operation
magento2-dockergento copied to clipboard

Mailhog Setup

Open cyildirim opened this issue 5 years ago • 2 comments
trafficstars

How do we approach mailhog setup for dockergento ? If it's something we can go for, i am happy to contribute.

cyildirim avatar May 22 '20 02:05 cyildirim

@cyildirim

you prob need to create a PR and in the docker-compose.yml you can add the mailhog configuration

mailhog: image: mailhog/mailhog logging: driver: 'none' ports: - "1025:1025" - "8025:8025"

alainseys avatar May 09 '21 21:05 alainseys

How do we approach mailhog setup for dockergento ? If it's something we can go for, i am happy to contribute.

How do we approach mailhog setup for dockergento ? If it's something we can go for, i am happy to contribute.

here you have an example

version: "3.7"

services:
  phpfpm:
    #image: modestcoders/php:7.2-fpm
    build: ./config/dockergento/phpfpm
    volumes: &appvolumes
      - sockdata:/sock
      - ../.composer:/var/www/.composer:delegated
      - ../.composer:/var/www/html/var/composer_home:delegated
      - ./config/dockergento/nginx/conf/default.conf:/var/www/conf/nginx/default.conf:delegated
    environment:
      PHP_IDE_CONFIG: serverName=localhost
    depends_on:
      - db
      - elasticsearch

  nginx:
    image: modestcoders/nginx:1.13
    ports:
      - 80:8000
    volumes: *appvolumes
    depends_on:
      - phpfpm
      - mailhog

  db:
    image: mysql:5.7
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: magento
      MYSQL_USER: magento
      MYSQL_PASSWORD: magento
    volumes:
      - dbdata:/var/lib/mysql

  node:
    image: modestcoders/node-php:node8-php7.2
    ports:
      - 35729:35729
    volumes: *appvolumes
    depends_on:
      - phpfpm

  elasticsearch:
    image: modestcoders/elasticsearch:6.5
    environment:
      - discovery.type=single-node
    volumes:
      - elasticsearch_data:/usr/share/elasticsearch/data

  mailhog:
    image: mailhog/mailhog:latest
    ports:
      - 1025:1025
      - 8025:8025
    logging:
      driver: 'none'
    volumes: *appvolumes
    
volumes:
  dbdata:
  sockdata:
  elasticsearch_data:

alainseys avatar Sep 05 '21 21:09 alainseys