The post about “leaving Seafile” and my own trials & tribulations about migrating from old server to new has got me thinking. I’ve got a cold so can’t face real work.
I find the proliferation of different configuration formats fascinating. You’d have thought that after 50 years of (micro) computers, that we’d have worked out the best way to write configuration files? It’s a microcosm of software development. For many years, the simple text file with headings worked fine:
[General]
Title = Malt Seafile
I assume the reason that Windows implemented the registry was a) technically all configurations in one place and b) binary so faster than parsing text files, important with the first 16-bit CPUs running Windows.
Then along came XML which has great aspirations include a strict format guide to ensure the XML was valid. It was the future they said!
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<General>
<Title>Malt Seafile</Title>
</General>
</root>
But maybe it was too strict and complex when that interpreted loosely typed JavaScript came along with the associated JSON. I must say I quite like JSON because it’s so quick to write and is pretty portable. But mainly because it can be consumed by PowerShell so easily. It’s my current format of choice although not without issues, the main being lack of comments.
{
"General": {
"Title": "Malt Seafile"
}
}
Although, it’s not that human readable is it so I assume that’s why YAML popped up. One has to admit it’s a lot easier to read so maybe I need to look at that for my configuration format of choice. It’s almost a return to simple Linux config files but on steroids with nested structure.
---
General:
Title: Malt Seafile
There is a reason for this rambling post - Seafile configuration is rather, err, fiddly with it split over six (at least) files:
ccnet.conf: traditional Linux configuration
gunicorn.conf.py: Python code
seafdav.conf: traditional Linux configuration
seafevents.conf: traditional Linux configuration
seafile.conf: traditional Linux configuration
seahub_settings.py: Python code
Would it not be possible to merge all these into a single configuration file? You added the .env files in docker. If so, which format would be the best? For quick implementation, a utility could read the single configuration file and produce the above separate config files?
