I'm working on a Docker setup for Flarum. Here is some notes on my experiences so far.
It is fantastic that I can load the application code using composer. Thumbs up!
Issue 1: the web based installation part – in order to fully prepare a working installation before handing over to the users, I would need to automate the installation process also covering database initialization. It there was a way to initialize the database in example from a CLI that would be perfect.
The config.php
file is php code, and contains ONLY config. That is perfect! It makes it very simple to load DB parameters from environment variables, or in the case of Kubernetes, secret files. Thumbs up!
Issue 2: the assets directory – it seems to me that the web based installer also builds some asset files. I need to automate the installation of these. Any reasons these things, like font-awsome, is not fetched automatically. If not available through composer, maybe use bower or similar.
The assets directory was wiped since the last time I built an image, so I now have to reinitialize the db in order to get hold on the assets directory and include that statically with the docker package until I have a solution.
I'm not sure about the rest yet, this is as far as I have come until now.
I would strongly encourage the developers to prepare the software to be more compatible with docker setups, I believe there will be an increasing number of deployments where this is wanted.