Greg's Tech blog

Moving to Docker-compose

Thursday 29 of April, 2021

I'm real late to the docker game, but listenting to the Self Hosted podcast recently has helped me realize the simplicity of this configuration.  Well, simple once  you understand it.  I spent the day today moving my native webservices to docker.  Here's how it went

Things I needed to move and make work


  • TikiWiki - been running this CMS for 18 years now.  Iit has to go with me
  • mariadb - it currently holds greyhole and tiki dtabases
  • greyhole connection to mariadb
  • nextcloud - I don't really need this, but I have it running in a standalong container and I want it in DC


It took me all day to get a working config just for mariadb.  All the issues were authentication related once the db spun up in a container.  Here's what I think I know:


  • apps in a container connect using "%" as the host
  • apps outside a container use localhost


Greyhole was a special case.  Since mariadb is in a container, localhost no longer works as a db_host.  I changed it to and it worked fine.  One other issue - retstarting the docker-compose disconnects the session and greyhole must be restarted. I may consider a separate mariadb instance for this

For mariiadb migration, I was hoping if i simply mounted the physical mariadb folder into th container, that the container version would just use it, but that didn't work.  I h ad to dump and import the existing data and recreate users.