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
562 stars 80 forks source link

Integrate git cloning and pushing #83

Closed DylanVanAssche closed 3 years ago

DylanVanAssche commented 4 years ago

This PR adds the setup to use git cloning and pushing of your CalDAV/CardDAV files.

You need the following environment variables:

  1. GIT_REPOSITORY: The repository URL, with username and password, example: https://myuser:mypass@github.com/myuser/myrepo
  2. GIT_USERNAME: The username to be used for commits
  3. GIT_EMAIL: The email to be used for commits

And enable the hook in your config file:

[storage]
hook = git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s) && git push origin master

This option is fully optional, if the environment variables are not defined, the git repository is not used. Looking forward to your review :)

DylanVanAssche commented 4 years ago

Done :+1:

tomsquest commented 3 years ago

@DylanVanAssche Your PR has been merged, I will publish a new version soon. Thanks for your contribution.

tomsquest commented 3 years ago

Released in 2.1.12.2