Setup MySQL, PHPMyAdmin and Nextcloud In Docker

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Setup MySQL, PHPMyAdmin and Nextcloud In Docker

      New

      Hi

      I'm new to the forums and I've recently bought a Rock64 from Pine64 and have successfully installed OMV onto a 64GB Micro SD Card.

      To cut a long story short I want to install a MySQL DB with PHPMyAdmin as the front-end GUI and then setup Nextcloud.

      So far I have installed the latest following Docker images:-
      MySQL - hub.docker.com/r/mysql/mysql-server
      PHPMyAdmin - hub.docker.com/r/phpmyadmin/phpmyadmin


      These are the ports I would like to utilise:-
      OMV - 80 (default)
      PHPMyAdmin - 8080
      Nextcloud - 8888

      Ideally I would like to setup this up in the OMV GUI as much as possible, however if commands are required I happy to use them via SSH. I have a website and I'm a YouTube content creator so If I can set this up well I will be making a guide and sharing for others to follow.

      Many thanks

      Will
    • New

      This video will help with nextcloud and mysql - Installation and Setup Videos - Beginning, Intermediate and Advanced

      There are lots of videos on that thread that should let you figure out what you need for phpmyadmin.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • New

      Thanks for the reply.

      I had a look through his videos on YouTube before posting on here and did watch the Nextcloud video.



      However, he uses MariaDB whereas I would like to use PHPMyAdmin as a front-end for MySQL.

      I also watched this video but I'm having difficulty setting up NGINX with PHPMyAdmin. This video covers OMV 3 on a Raspberry Pi 3 so none of the commands from 13 minutes in apply to my Rock64 running OMV 4.


      Many thanks

      Will

      The post was edited 3 times, last by willowen100 ().

    • New

      Stramm wrote:

      As you already mentioned phpMyAdmin is just a frontend. You either need MySQL or MariaDB as database management system.
      The problem I'm having is setting them all up so they communicate with one another. Through Docker I can install Nextcloud, MySQL and PHPMyAdmin. When you click on the 'run' button it's the settings on this popup window I need to configure.
    • New

      willowen100 wrote:

      he uses MariaDB whereas I would like to use PHPMyAdmin as a front-end for MySQL.
      You do realize that mariadb is mysql, right? mariadb is what you get when you install the "mysql" package on Debian 9/OMV 4.x.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • New

      Either you just run both, mariadb and phpAdmin and connect via exposed ports or, if you only want phpAdmin to connect to mariadb and nothing else, you create a docker net and add both to it. Docker Compose has some nicely structured yaml files with the flag links. This does the very same, creating a docker net and add all linked containers in it.
    • New

      I've found this guide which fits the bill
      tecadmin.net/tutorial/docker/docker-networking-example/

      Here are the commands I have been running from SSH

      Source Code

      1. ##### Instructions #####
      2. ## Prerequisites ##
      3. # Install MySQL
      4. docker pull mysql/mysql-server
      5. # Install PHPMyAdmin:4.6
      6. docker pull phpmyadmin/phpmyadmin
      7. ## Setup ##
      8. # Create Bridge
      9. docker network create -d bridge Nextcloud-bridge
      10. # Run MySQL and add to bridge
      11. docker run --name MySQL --network Nextcloud-bridge -e MYSQL_ROOT_PASSWORD=password -d mysql/mysql-server
      12. # Get IP for MySQL
      13. docker inspect MySQL | grep "IPAddress"
      14. # Run PHPMyAdmin with IP address
      15. docker run --name PHPMyAdmin -d -e PMA_HOST=IPAddress -p 8080:80 phpmyadmin/phpmyadmin
      16. or
      17. docker run --name PHPMyAdmin --network Nextcloud-bridge -d -p 8080:80 phpmyadmin/phpmyadmin
      Display All

      However, when running PHPMyAdmin its status is showing Exited (1) using lines 20 or 22. Any reason why PHPMyAdmin is failing to run?

      The post was edited 5 times, last by willowen100 ().

    • New

      Just checked, they stripped the image down and there is no bash installed inside, but sh of course is.

      docker run -it --rm -p 8080:80 --network Nextcloud-bridge phpmyadmin/phpmyadmin /bin/sh

      You can than check everything inside. In the root folder there is a script run.sh, which kind of looks like the entrypoint script, but they propably used CMD too, looking at run.sh. Feel free to check at dockerhub, how this image is build.
      Running the container like this:
      docker run --name test --rm -p 8080:80 phpmyadmin/phpmyadmin
      which is basically the same you do, despite not connecting it to a docker net,works just as it is supposed and I can open phpAdmin at localhost:8080

      You should now track this down. If my last command wont run, you got some other issues. Maybe you use an arm platform and try to run this image? If this command works, you need to go back checking what exactly fails, start by not using -d and look at the prompts or by manually starting it step by step out from sh.