Untitled

mail@pastecode.io avatar
unknown
yaml
a year ago
821 B
1
Indexable
Never
version: "3.9"
services:
    db:
        image: mysql
        ports:
            - 3306:3306
        command: --default-authentication-plugin=mysql_native_password
        restart: always
        environment:
            MYSQL_USER: admin
            MYSQL_PASSWORD: password
            MYSQL_DATABASE: learningmdb
            MYSQL_ROOT_PASSWORD: password
        volumes:
            - "test_db:/var/lib/mysql"
            
    # for php myadmin goto http://localhost:8080
    db_admin:
        image: phpmyadmin/phpmyadmin
        ports:
            - 8080:80
        restart: "on-failure"
        depends_on:
            - db
        links:
            - db
        environment:
            PMA_HOST: db
            PMA_PORT: 3306
            PMA_USER: admin
            PMA_PASSWORD: password

volumes:
    test_db: