cblgh / cerca

lean forum software
Other
124 stars 18 forks source link

Adding "create admin" functionality to the cerca binary #74

Open decentral1se opened 1 month ago

decentral1se commented 1 month ago

One separate issue from https://github.com/cblgh/cerca/issues/71 is that we ran out of disk space during the build process and had to uninstall the system Go version.

We then realised we need to build two separate binaries for 1) create the user 2) bump that user up to admin.

AFAIU this has to happen on the CLI one time. Then the rest is glorious web UI.

For this mandatory CLI initialisation, I think it would be much handier to have this functionality on the same binary as a sub-command? Also, potentially merging this into "create new admin" vs. "create user, bump up to admin".

Additionally, having specify the full URL on the user creation / admin creation is a bit awkward to type out and it actually has no effect, only for the logging out on the CLI? You mostly already know where to go if you're setting things up anyway? So, I think these options could be removed even.

decentral1se commented 3 weeks ago

GtS has a much more complicated build but if you look at:

https://github.com/superseriousbusiness/gotosocial/blob/540edef0c20dad4ea13d8af091ccf69796b848b6/.goreleaser.yml#L159-L182

You can see that there is a way to get Goreleaser to build a nice little zip file up of all the files (e.g. assets/ dir) and binaries you'd need to hit the ground running with cerca on a system.

Another approach vs. merging binaries.

cblgh commented 3 weeks ago

ty! i'm not opposed to putting some more useful commands into the main cerca binary if it helps. as mentioned elsewhere, there are some decisions that are intentional and laden with meaning. and then there are some that are the way they are purely for historical reasons—the ask in this issue falls into the latter :]

cheers for the gotosocial link; i've seen goreleaser and even used it once or twice. not sure yet if i will go down that route here, though!


side note: what are the specs, roughly, of the pmc machine running cerca?

decentral1se commented 3 weeks ago

side note: what are the specs, roughly, of the pmc machine running cerca?

afair 1 core, 512 mem, ~ 15gb disk. we didn't run out of space due to go or go deps just yet but running source build systems of all the tools on the machine probably isn't gonna pan out well 🙃

cblgh commented 3 weeks ago

until i reach a decision on Official Builds™️ (some things i want to try out on that front :) i can offer to host builds privately for y'all. how does that sound?

decentral1se commented 3 weeks ago

Oh no worries for now, I can build / transfer binaries (and thanks for offering!). This is more for others doing the first server install who might run into it.