services:
    mysql:
        image: mysql:8.0
        container_name: project_board_mysql
        restart: unless-stopped
        environment:
            MYSQL_ROOT_PASSWORD: root
            MYSQL_DATABASE: template
            MYSQL_USER: admin
            MYSQL_PASSWORD: adminpassword
        ports:
            - '3304:3306'
        volumes:
            - mysql_data:/var/lib/mysql
        networks:
            - template

    phpmyadmin:
        image: phpmyadmin:latest
        container_name: project_board_phpmyadmin
        restart: unless-stopped
        environment:
            PMA_HOST: mysql
            PMA_PORT: 3306
            PMA_USER: root
            PMA_PASSWORD: root
        ports:
            - '8080:80'
        depends_on:
            - mysql
        networks:
            - template

volumes:
    mysql_data:

networks:
    template:
        driver: bridge