version: '3.0'

volumes:
  vendor:

services:
    app:
        build:
            dockerfile: ./Dockerfile
        container_name: payment
        volumes:
            - ./:/var/www/html
            - vendor:/var/www/html/vendor
            - ./.docker/apache.conf:/etc/apache2/conf.d/site.conf
        ports:
            - ${APP_PORT}:80

    mysql:
        image: bitnami/mysql:5.7
        environment:
            - MYSQL_DATABASE=${DB_DATABASE}
            - MYSQL_USER=${DB_USERNAME}
            - MYSQL_PASSWORD=${DB_PASSWORD}
            - MYSQL_ROOT_PASSWORD=root

    adminer:
        image: adminer:4.8.0
        environment:
            - ADMINER_DEFAULT_SERVER=mysql
        ports:
            - 8080:8080

    mailhog:
        image: mailhog/mailhog:latest
        container_name: myapp-mailhog
        ports:
            - "11025:1025"
            - "18025:8025"
