version: '3'
services:
    app:
        build: .
        depends_on:
            - db
        ports:
            - '${APP_DOCKER_PORT-8080}:80'
        volumes:
            - .:/srv/app
        links:
            - db:db
        env_file:
            - .docker.env
    db:
        image: mysql/mysql-server:8.0
        ports:
            - '${DB_DOCKER_PORT-13306}:3306'
        volumes:
            - ./.docker/dbdata:/var/lib/mysql
        environment:
            - MYSQL_DATABASE=crowenterprise_docker
            - MYSQL_ROOT_PASSWORD=password
            - MYSQL_ROOT_HOST=%
