version: '3.7'

services:
    database:
        image: mysql:${MYSQL_VERSION:-8}-oracle
        ports:
            - '3306:3306'
        tmpfs:
            - /var/lib/mysql:uid=999,gid=999
        environment:
            MYSQL_ROOT_PASSWORD: root
            MYSQL_DATABASE: shopware

    adminer:
        image: adminer:latest
        depends_on: [ database ]
        environment:
            ADMINER_DEFAULT_SERVER: database
        ports:
            - '8080:8080'

    mailer:
        image: mailhog/mailhog
        ports:
            - '8025:8025'

    opensearch:
        image: opensearchproject/opensearch:2
        ports:
            - '9200:9200'
        volumes:
            - opensearch-data:/usr/share/opensearch/data
        environment:
            discovery.type: single-node
            plugins.security.disabled: 'true'

volumes:
    db-data:
    opensearch-data:
