Configuration file creep

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?

We are focused on enhancing the configurations and documentation with each major release. (To ensure compatibility, we only modify a portion of the configurations in each release.)

Starting with version 12.0, we have transitioned to a Docker-based distribution and installation method. Additionally, we are gradually consolidating configurations into a .env file, which will serve as the central repository for all configurations, with the exception of a few particularly complex settings (such as role permissions).

The ccnet.conf file has been removed as of version 12.0.

Database and memcache configurations have been relocated to the .env file, eliminating the need to configure them across multiple configuration files.

Since version 12.0, the admin manual has multiple versions corresponding to each major release, enhancing clarity.

1 Like

I’ve finally found the v12 upgrade notes which really helps! I know I gripe about documentation but me not thinking there were v12 notes has wasted a lot of time. I guess I need to ask first in future if I can’t find them.

If the .env file is the only configuration file needed then this is a BIG step forward. I know the .env format is a docker thing but am confused why they chose a dot-file so it’s hidden?