version: '2'

services:
    #
    # Web
    #
    leads:
        build: .
        ports:
          - "1929:80"
        working_dir: "/var/www/html"
        environment:
            SERVERNAME: leads.fr
            SERVERALIASES: leads.fr
        volumes:
            - ..:/var/www/html
        networks:
            - public
    #
    # Db
    #
    mysql-leads:
        image: mysql:5.7
        command: ['--innodb-file-per-table=true']
        environment:
          MYSQL_ROOT_PASSWORD: root
        ports:
          - "1939:3306"
        networks:
            - public

    phpmyadmin-leads:
        environment:
            - PMA_ARBITRARY=1
            - PMA_HOSTS=mysql-leads
        image: phpmyadmin/phpmyadmin:latest
        links:
          - mysql-leads
        ports:
          - "1949:80"
        networks:
            - public
networks:
    public:
