agola-io / agola

Agola: CI/CD Redefined
https://agola.io
Apache License 2.0
1.5k stars 117 forks source link

Update devel.md with additional information #527

Closed Puffy1215 closed 1 month ago

Puffy1215 commented 3 months ago

What would you like to be added: Update devel.md to include the directories that need to be created for the agola binary to work correctly with its databases (in my case it was the notification and gitserver directories).

This is automatically handled when creating the Docker containers.

An alternative would be updating the codebase to generate these directories when running agola serve.

Why is this needed: Save new developers to the project time, and let them get into the actual implementation faster.

sgotti commented 3 months ago

An alternative would be updating the codebase to generate these directories when running agola serve.

This is the real thing that needs to be fixed. Some directories are already created while other not. So or we create all of them or none of them.

Puffy1215 commented 3 months ago

Ah. I didn't see an issue for it. I could create a new issue and try implementing something for it?

sgotti commented 3 months ago

Ah. I didn't see an issue for it.

I don't think there's an already opened issue. I just noticed this because you reported it. Feel free to try to fix it.

Probably the directories are created by the object storage package that happens only for runservice and configstore.

BTW I see that you wrote in PR #528 to create a datadir for the notification service but the notification service doesn't have a datadir. Probably you had an error since you used the sqlite db and the directory containing the sqlite db file was missing, but the sqlite file may leave also outside the datadir. This means that also the directory for the sqlite db should be created.

So the fix should be to create the datadir (for the service that have it) and the db dir if the db is sqlite3 (for the service that have a db) at the service start (or change the sqlg package to do this). The objectstorage already creates its directories.

Puffy1215 commented 3 months ago

Ah. Yes, about the dataDir, the problems of reading a config.yml too quickly ;) . I believe I meant the connString value.

I'll close this issue and reopen another. I'll link this one into it. And for my PR you can reject it or I'll put it down at some point seeing as it will be unnecessary.