cerca icon indicating copy to clipboard operation
cerca copied to clipboard

-authkey -data configurable via cerca.toml?

Open decentral1se opened this issue 1 year ago • 10 comments

There was some confusion around not being able to configure the -authkey/-allowlist/-data via the configuration file and only by the command-line? It's a bit unhandy when writing up a systemd unit file and having to enter configuration twice for running cerca. Can those two options be put into the cerca.toml also? See https://github.com/cblgh/cerca/issues/71#issue-2510267809 for the example unit service file.

decentral1se avatar Sep 06 '24 13:09 decentral1se

hm, mayhaps a new config section:

[[settings]]

which could contain the various cli flags that aren't yet covered. however, the values from the cli flags should have a higher precedence than the values specified in the config => if both a cli flag and the corresponding key is set in [[settings]], then we use the cli flag's value

cblgh avatar Sep 08 '24 17:09 cblgh

Agreed, sounds like a plan!

decentral1se avatar Sep 09 '24 10:09 decentral1se

Picking this one next then 🤘

decentral1se avatar Nov 22 '24 10:11 decentral1se

:fire:

cblgh avatar Nov 22 '24 10:11 cblgh

possible inspo https://github.com/ssbc/go-ssb/pull/138 - feel free to use or ignore :>

cblgh avatar Nov 22 '24 10:11 cblgh

Oh wait a sec, we're due a merge conflict if I wire up config support for an option that is going away shortly in https://github.com/cblgh/cerca/issues/75. I'll dive into this after invites get merged 👍

decentral1se avatar Nov 23 '24 23:11 decentral1se

feature flag potential afaiu https://github.com/cblgh/cerca/pull/92

decentral1se avatar Dec 11 '24 11:12 decentral1se

kinda! i think one section could be normal flags, like --authkey, while another section toggles functionality on and off. this latter is what i think of with a "feature flag" while the first section would be more of a, uhh, runtime configuration?

cblgh avatar Dec 11 '24 13:12 cblgh

OK, nice, adding to my december adventure stack 😌 i'm very tight on time and deep in another code cave, so please someone else feel free to pick it up in the meantime!

I feel like this is really the final thing to make deploying cerca much easier easier. along with all the latest changes, it's really cool to see the progress!

decentral1se avatar Dec 11 '24 15:12 decentral1se

OK, nice, adding to my december adventure stack 😌 i'm very tight on time and deep in another code cave, so please someone else feel free to pick it up in the meantime!

ayy there's no rush! we're cruising in a no burnout zone here. we'll see if i stall out on the other things i've had in mind and implement a repeat of my go-ssb env/flag/config bznz. if not, then well, the context is documented here for later! :)

cblgh avatar Dec 12 '24 14:12 cblgh

Done in #117.

vladh avatar Jun 29 '25 06:06 vladh