tomsquest / docker-radicale

Docker image for Radicale calendar and contact server :calendar: + security :closed_lock_with_key: + addons :rocket:
GNU General Public License v3.0
593 stars 82 forks source link

Git integration #126

Closed allwi closed 1 year ago

allwi commented 1 year ago

Hi there,

thanks for all your work on this. It works fine ... but the documentation is quite slim. I tried to integrate your docker container with GIT.

as SU, I

I configured the hook in the storage section as advised but when I change an event, I get the following error message

[2023-02-06 05:59:38 +0000] [6/Thread-16] [ERROR] An exception occurred during PUT request on '/<usr>/<cal>/7db25d88-1e61-4382-9421-87ef77c46d74.ics': Command 'git add -A && (git diff --cached --quiet || git commit -m "Changes by "<usr>)' returned non-zero exit status 128.

I tried the same (repo creation etc) as the radicale user on the host system but this give me the same results. When I try this within the container, I get access privilege issues?

How should I actually create and initialize the GIT repo?

tomsquest commented 1 year ago

Hi @allwi ,

From the quote, definitely git failed to run.

You can debug it by "entering" the container and running the command yourself (docker exec -it radicale, then run your script).

allwi commented 1 year ago

@tomsquest Thanks for your response. I got it working but not sure, if this is the best practice. I recreate the radicale user on my host system as a real user (previous I created nohome/nologin), init the repo by this user and mounted the home directory in the docker container. Now everything works fine. Any comments?

tomsquest commented 1 year ago

Ah good question. I don't know what git requires as user, maybe some writable dir with correct permissions. Not 100% sure.

allwi commented 1 year ago

Cool, it's working now. So issue closed :) Might be still a good idea to have a bit more detailed description how to get it working.