version: '2'
services:
    mysql:
        image: mysql
        environment:
            - MYSQL_DATABASE=filebin
            - MYSQL_USER=filebin
            # TODO: can this be set to a random password?
            - MYSQL_PASSWORD=filebin-docker-demo
            - MYSQL_RANDOM_ROOT_PASSWORD=yes

    filebin:
        links:
            - mysql
        build: ..
        ports:
            - "8080:8080"
        environment:
            - FB_DB_HOSTNAME=mysql
            - FB_DB_USERNAME=filebin
            - FB_DB_PASSWORD=filebin-docker-demo
            - FB_DB_DATABASE=filebin
            - FB_CONTACT_NAME=John Doe
            - FB_CONTACT_MAIL=root@example.local
            - FB_SMTP_HOST=localhost
            - FB_SMTP_PORT=587
            - FB_SMTP_USER=webmaster@example.invalid
            - FB_SMTP_PASSWORD=mysecretpassword


version: '2'
services:
    mysql:
        image: mysql
        command: --default-authentication-plugin=mysql_native_password
        environment:
            - MYSQL_DATABASE=filebin
            - MYSQL_USER=filebin
            # TODO: can this be set to a random password?
            - MYSQL_PASSWORD=filebin-docker-demo
            - MYSQL_RANDOM_ROOT_PASSWORD=yes

    filebin:
        links:
            - mysql
        build: ..
        ports:
            - "8080:8080"
        environment:
            - FB_DB_HOSTNAME=mysql
            - FB_DB_USERNAME=filebin
            - FB_DB_PASSWORD=filebin-docker-demo
            - FB_DB_DATABASE=filebin
            - FB_CONTACT_NAME=John Doe
            - FB_CONTACT_MAIL=root@example.local
            - FB_SMTP_HOST=localhost
            - FB_SMTP_PORT=587
            - FB_SMTP_USER=webmaster@example.invalid
            - FB_SMTP_PASSWORD=mysecretpassword


Fix PHP mysql authentication issue
docker: Fix PHP mysql authentication issue

Fixes #28

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Signed-off-by: Florian Pritz <753f544d2d01592750fb4bd29251b78abcfc8ecd@xinu.at>
