Standardising file structure for app repositories #29

Closed
opened 2020-10-24 13:51:18 +00:00 by decentral1se · 9 comments
Owner

Looking at the file list for https://git.autonomic.zone/coop-cloud/mediawiki

➜  mediawiki (main) ✔ tree 
.
├── compose.mailrelay.yml
├── compose.openid.yml
├── composer.local.json.tmpl
├── compose.simplesaml.yml
├── compose.yml
├── entrypoint.sh.tmpl
├── entrypoint.simplesaml.sh.tmpl
├── htaccess.tmpl
├── LICENSE
├── LocalSettings.php.tmpl
├── README.md
└── renovate.json

Can we imagine a folder structure that might make this more understandable? Thinking in the line of Ansible role structure, certain things go certain places and after you realise what the names of the dirs are, you kinda just grok what to expect.

I am thinking this way, we can keep just barging at full 100% add a config when you need it speed and just admit this is simply the more fun and more simple way to do shit.

Then we adapt abra to understand that structure.

Looking at the file list for https://git.autonomic.zone/coop-cloud/mediawiki ``` ➜ mediawiki (main) ✔ tree . ├── compose.mailrelay.yml ├── compose.openid.yml ├── composer.local.json.tmpl ├── compose.simplesaml.yml ├── compose.yml ├── entrypoint.sh.tmpl ├── entrypoint.simplesaml.sh.tmpl ├── htaccess.tmpl ├── LICENSE ├── LocalSettings.php.tmpl ├── README.md └── renovate.json ``` Can we imagine a folder structure that might make this more understandable? Thinking in the line of Ansible role structure, certain things go certain places and after you realise what the names of the dirs are, you kinda just grok what to expect. I am thinking this way, we can keep just barging at full 100% add a config when you need it speed and just admit this is simply the more fun and more simple way to do shit. Then we adapt abra to understand that structure.
Owner

I kind of despise the Ansible death-by-subdirectories {meta,defaults,tasks,templates,files} approach but I agree that not using any at all is getting unwieldy.

What about having one folder per optional addon, and a files (ISO better name) folder for everything except the basics?

.
├── mailrelay
├──── compose.mailrelay.yml
├── openid
├──── compose.openid.yml
├──── composer.local.json.tmpl
├── simplesaml
├──── compose.simplesaml.yml
├──── entrypoint.simplesaml.sh.tmpl
├── templates
├──── entrypoint.sh.tmpl
├──── htaccess.tmpl
├──── LocalSettings.php.tmpl
├── compose.yml
├── LICENSE
├── README.md
└── renovate.json

Ooooor any other suggestions?

I kind of despise the Ansible death-by-subdirectories `{meta,defaults,tasks,templates,files}` approach but I agree that not using any at all is getting unwieldy. What about having one folder per optional addon, and a `files` (ISO better name) folder for everything except the basics? ``` . ├── mailrelay ├──── compose.mailrelay.yml ├── openid ├──── compose.openid.yml ├──── composer.local.json.tmpl ├── simplesaml ├──── compose.simplesaml.yml ├──── entrypoint.simplesaml.sh.tmpl ├── templates ├──── entrypoint.sh.tmpl ├──── htaccess.tmpl ├──── LocalSettings.php.tmpl ├── compose.yml ├── LICENSE ├── README.md └── renovate.json ``` Ooooor any other suggestions?
Author
Owner

Yeah feeling that! Bit unclear how entrypoint.simplesaml.sh.tmpl doesn't go in templates but is a template file? So, another way might be the following. I don't really like the word optional though but it is one dir vs. $n optional dirs per-option. Happy to adjust.

.
├── compose.yml
├── LICENSE
├── optional
│   ├── compose.mailrelay.yml
│   ├── compose.openid.yml
│   └── compose.simplesaml.yml
├── README.md
├── renovate.json
└── templates
    ├── composer.local.json.tmpl
    ├── entrypoint.sh.tmpl
    ├── entrypoint.simplesaml.sh.tmpl
    ├── htaccess.tmpl
    └── LocalSettings.php.tmpl
Yeah feeling that! Bit unclear how `entrypoint.simplesaml.sh.tmpl` doesn't go in `templates` but is a template file? So, another way might be the following. I don't really like the word `optional` though but it is one dir vs. $n optional dirs per-option. Happy to adjust. ``` . ├── compose.yml ├── LICENSE ├── optional │   ├── compose.mailrelay.yml │   ├── compose.openid.yml │   └── compose.simplesaml.yml ├── README.md ├── renovate.json └── templates ├── composer.local.json.tmpl ├── entrypoint.sh.tmpl ├── entrypoint.simplesaml.sh.tmpl ├── htaccess.tmpl └── LocalSettings.php.tmpl ```
Owner

it is one dir vs. $n optional dirs per-option

Yeah that seems like an improvement.

More thoughts: isn't entrypoint.simplesaml.sh.tmpl "optional" but isn't in the "optional" dir? And why are compose files split between root and "optional" but templates are all in one place?

Naming Things Is Hard™

Propose an unholy alliance between the two ideas:

stacks/mediawiki/
├── base
│   ├── entrypoint.sh.tmpl
│   └── LocalSettings.php.tmpl
├── compose.yml
├── extra
│   ├── compose.mailrelay.yml
│   ├── compose.openid.yml
│   ├── composer.local.json.tmpl
│   ├── compose.simplesaml.yml
│   └── entrypoint.simplesaml.sh.tmpl
├── README.md
└── renovate.json

(I cheated by removing htaccess.tmpl, no longer required with the latest MW image)

> it is one dir vs. $n optional dirs per-option Yeah that seems like an improvement. More thoughts: isn't `entrypoint.simplesaml.sh.tmpl` "optional" but isn't in the "optional" dir? And why are compose files split between root and "optional" but templates are all in one place? Naming Things Is Hard™ Propose an unholy alliance between the two ideas: ``` stacks/mediawiki/ ├── base │   ├── entrypoint.sh.tmpl │   └── LocalSettings.php.tmpl ├── compose.yml ├── extra │   ├── compose.mailrelay.yml │   ├── compose.openid.yml │   ├── composer.local.json.tmpl │   ├── compose.simplesaml.yml │   └── entrypoint.simplesaml.sh.tmpl ├── README.md └── renovate.json ``` (I cheated by removing `htaccess.tmpl`, no longer required with the latest MW image)
Author
Owner

Ah fuck, I see your point. I don't like "base" or "extra" as too generic (sorry this is deep into a bikeshed now). WHAT ABOUT just a single templates folder where anything with a ".tmpl" ile ending goes in, doesnt matter what, simple rule. Then keep all the compose files out in the main root?

├── compose.mailrelay.yml
├── compose.openid.yml
├── compose.simplesaml.yml
├── compose.yml
├── LICENSE
├── README.md
├── renovate.json
└── templates
    ├── composer.local.json.tmpl
    ├── entrypoint.sh.tmpl
    ├── entrypoint.simplesaml.sh.tmpl
    ├── htaccess.tmpl
    └── LocalSettings.php.tmpl
Ah fuck, I see your point. I don't like "base" or "extra" as too generic (sorry this is deep into a bikeshed now). WHAT ABOUT just a single templates folder where anything with a ".tmpl" ile ending goes in, doesnt matter what, simple rule. Then keep all the compose files out in the main root? ``` ├── compose.mailrelay.yml ├── compose.openid.yml ├── compose.simplesaml.yml ├── compose.yml ├── LICENSE ├── README.md ├── renovate.json └── templates ├── composer.local.json.tmpl ├── entrypoint.sh.tmpl ├── entrypoint.simplesaml.sh.tmpl ├── htaccess.tmpl └── LocalSettings.php.tmpl ```
Author
Owner

Damn, I'm struggling, maybe that also sucks 🙈

Naming Things Is Hard™

Forgot to pay homage to this statement. I expect to be smote down momentarily.

Damn, I'm struggling, maybe that also sucks 🙈 > Naming Things Is Hard™ Forgot to pay homage to this statement. I expect to be smote down momentarily.
decentral1se added this to the Public mini-launch milestone 2020-10-27 08:04:48 +00:00
decentral1se added the
design
label 2020-10-27 08:09:14 +00:00
Author
Owner

Fuck it, it is too hard, let's just go with what we have.

Fuck it, it is too hard, let's just go with what we have.
Owner

One more because why not:

.
├── composer.local.json.tmpl
├── compose.yml
├── entrypoint.sh.tmpl
├── extras
│   ├── compose.mailrelay.yml
│   ├── compose.openid.yml
│   ├── compose.simplesaml.yml
│   └── entrypoint.simplesaml.sh.tmpl
├── LocalSettings.php.tmpl
├── php.ini.tmpl
├── README.md
└── renovate.json

Could do addons / optional instead of extras?

One more because why not: ``` . ├── composer.local.json.tmpl ├── compose.yml ├── entrypoint.sh.tmpl ├── extras │   ├── compose.mailrelay.yml │   ├── compose.openid.yml │   ├── compose.simplesaml.yml │   └── entrypoint.simplesaml.sh.tmpl ├── LocalSettings.php.tmpl ├── php.ini.tmpl ├── README.md └── renovate.json ``` Could do `addons` / `optional` instead of `extras`?
Author
Owner

OK, let's keep the fires burning on this one :)

OK, let's keep the fires burning on this one :)
decentral1se added this to the (deleted) project 2020-12-27 11:49:03 +00:00
decentral1se removed this from the Public mini-launch milestone 2021-03-02 09:14:57 +00:00
decentral1se added this to the (deleted) milestone 2021-03-02 12:20:41 +00:00
decentral1se added this to the Wider libre apps selection milestone 2021-09-09 14:32:57 +00:00
Author
Owner

We seem to be getting on just fine with flat structure!

We seem to be getting on just fine with flat structure!
Sign in to join this conversation.
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#29
No description provided.