services:
    phpmyadmin:
        image: phpmyadmin
        restart: always
        links:
            - db
        ports:
            - 8081:80
        environment:
            - PMA_ARBITRARY=1
        networks:
            - dsp_network
    db:
        image: mysql:5.7
        ports: 
            - 3307:3306
        environment:
            - MYSQL_ROOT_PASSWORD=tiger
            - MYSQL_PASSWORD=181184
            - MYSQL_DATABASE=dropshipprint
            - MYSQL_USER=machalex
        volumes:
            - db_data:/var/lib/postgresql/data
        networks:
            - dsp_network
    web:
        build: .
        depends_on:
            - db
        ports:
            - 8080:80
        volumes:
            - ./:/var/www
        networks:
            - dsp_network

networks:
    dsp_network:
        driver: bridge

volumes:
    db_data: