version: '2'

volumes:
    db-data:
    vendor:
    var:

services:
    mysql:
        image: mysql:5
        ports:
            - "3306"
        volumes:
            - db-data:/var/lib/mysql
        environment:
            MYSQL_ROOT_PASSWORD: password
            MYSQL_DATABASE: prestashop
        restart: always
    apache:
        container_name: prestashop-git
        image: prestashop/prestashop-git:7
        environment:
            PS_INSTALL_AUTO: 1
            DB_PASSWD: password
            DB_NAME: prestashop
            DB_SERVER: mysql
            PS_DOMAIN: localhost:8001
            PS_FOLDER_INSTALL: install-dev
            PS_FOLDER_ADMIN: admin-dev
        ports:
            - "8001:80"
        volumes:
            - ./:/var/www/html/:delegated
            - vendor:/var/www/html/vendor
            - var:/var/www/html/var
        restart: always

