services:
    db:
        image: mysql:8.0
        container_name: mysql
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
            MYSQL_DATABASE: ${DB_DATABASE}
            MYSQL_USER: ${DB_USERNAME}
            MYSQL_PASSWORD: ${DB_PASSWORD}
        volumes:
            - db_data:/var/lib/mysql
        ports:
            - "3306:3306"

volumes:
    db_data:
        driver: local
