services:
    db:
        image: mariadb:10
        volumes:
            - data:/var/lib/mysql
        environment:
            - MYSQL_ROOT_PASSWORD=secret
            - MYSQL_DATABASE=wordpress
            - MYSQL_USER=manager
            - MYSQL_PASSWORD=secret
    web:
        image: wordpress:6
        depends_on:
            - db
        volumes:
            - .:/var/www/html/wp-content/plugins/xv-random-quotes
        environment:
            - WORDPRESS_DB_USER=manager
            - WORDPRESS_DB_PASSWORD=secret
            - WORDPRESS_DB_HOST=db
            - WORDPRESS_DB_NAME=wordpress
        ports:
            - 8080:80

volumes:
    data: