services:
    xinyuan-storage:
        build:
            args:
                WWWGROUP: 1000
            context: ./vendor/laravel/sail/runtimes/8.2
            dockerfile: Dockerfile
        depends_on:
            -   xinyuan-storage-mysql
        env_file:
            -   ./.env.local
        image: itlogiko/xinyuan-storage
        ports:
            -   8000:80
            -   5173:5173
        volumes:
            -   ./:/var/www/html/

    xinyuan-storage-mysql:
        environment:
            MYSQL_DATABASE: ${DB_DATABASE-xinyuan-storage}
            MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-secret}
        image: docker.io/library/mysql:8.4.1
        volumes:
            -   xinyuan-storage-mysql:/var/lib/mysql

volumes:
    xinyuan-storage-mysql:
        driver: local
