How to set up MariaDB with Portainer Stacks +(Docker-compose)

We’re using MariaDB for our business because it’s meant for big business, and it’s my favorite database to use for small businesses. And I have a lot of skill experience with MariaDB than any other database, but few other databases are lacking in my experience. Therefore, I do not have sufficient time to undertake these experiences. After I document all my notes and work for sure, I will study these (MongoDB, PostgreSQL) I use some on app after I document all my notes and work for sure. I will study these after I document all my notes and work for sure. Which is a pain for me, but I got the app working and stable. So let get start to Tutorial for MariaDB.

Please ensure that you complete this first. Before starting build this,

How to set up Portainer with nginx Proxy Manager

We need to create a network for the MariaDB database for another app to communicate. We prefer to refrain from exposing our port.

docker network create mariadb

Now we can begin to create details for the MariaDB Database on Portainer.

 version: '2'
    container_name: mariadb
      - mariadb
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
      - MYSQL_ROOT_PASSWORD=yourownpassword
      - /mnt/nasdrive/mariadb/:/var/lib/mysql
    external: true

Then you deploy the stacks. Your app will then be operational. Thereafter, you can easily add PhpMyAdmin to this docker-compose. But I like stacks because we can use the same app for many server databases.

OPTIONAL BONUS for PhpMyAdmin How to set up.