DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:gitbacked

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:gitbacked [2023-05-07 23:18] – Add link to release notes mhoffroggeplugin:gitbacked [2023-12-14 13:47] (current) – adds markus as author 213.47.191.196
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: Sync/store pages and media in a git repository. So you can show/edit your human-readable wiki dir (e.g. documentation) with DokuWiki and store it together with your source code in the same git repository. +description: Sync/store DokuWiki pages and media in a git repository. On saving page edits or on media file uploads DokuWiki will commit these changes to a git repository. If configured, commits will be pushed to a remote repo
-author     : Wolfgang Gassler  +author     : Wolfgang Gassler, Markus Hoffrogge
-email      : wolfgang@gassler.org +
 type       : action type       : action
 lastupdate : 2023-05-07 lastupdate : 2023-05-07
Line 45: Line 44:
  
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
- +|''pushAfterCommit'' |If activated, every commit (page edit) is pushed to the remote repository. Activate this flag if you already cloned from a remote location and the git environment is configured correctly (It has to be configured for the webserver/php user)\\ {{:wiki:usersmileys:button-note-yellow.png?72|}} The push will be performed within the http POST roundtrip of the page save. If this leads to insufficient user experience since of remote git server communcation delays, you should not activate this config and consider a CRON job as an alternative to perform the pushes periodically and independent of DokuWiki sessions. | 
-  * ''pushAfterCommit'' +|''periodicPull'' |If activated, the system executes a pull request and updates the local git repository. Thus, external commits on page files are merged from the remote. | 
- +|''periodicMinutes'' |Defines the period (in minutes) for the periodic pull request executions. | 
-If activated, every commit (page edit) is pushed to the remote repository. Activate this flag if you already cloned from a remote location and the git environment is configured correctly (attention: it has to be configured for the webserver/php user) +|''commitMsg''\\ ''commitMsgDel''\\ ''commitMediaMsg''\\ ''commitMediaMsgDel'' |The template strings which are used for the different commit messages (page edits, media edits, page deletion, media deletion). The placeholders ''%page%'',''%media%'', ''%summary%'' and ''%user%'' can be used and are replaced by the corresponding values during the commit process. | 
- +|''repoPath'' |The path to your git repository (root) -- set to the [[config:savedir]] by default (''./data'').\\ This must be configured either as a relative path (relative to the [[config:savedir]]) or as an absolute path.\\ {{:wiki:usersmileys:button-note-yellow.png?72|}} Absolute path configuration is supported since release **2023-03-07**. | 
-  * ''periodicPull'' +|''repoWorkDir''\\ {{https://img.shields.io/static/v1?label=Since&message=2015-10-03&color=green&.png?}} |This path is passed to the git command as the ''–work-tree'' commandline option if it is configured.\\ It can be configured as relative path (relative to the [[config:savedir]]) or as an absolute path.\\ {{:wiki:usersmileys:button-note-yellow.png?72|}} Since release **2023-03-07** you should configure this only if you are aware about the impact.\\ {{https://img.shields.io/static/v1?label=Since&message=2023-03-07&color=green&.png?}} default=''Empty string'' | 
- +|''ignorePaths''\\ {{https://img.shields.io/static/v1?label=Since&message=2015-10-03&color=green&.png?}} |Paths or files (comma separated) that will be ignored and not added by git (currently simple wildcard string matching of paths is performed). | 
-If activated, the system executes a pull request and updates the local git repository. Thus, external commits on page files are merged from the remote. +|''gitPath''\\ {{https://img.shields.io/static/v1?label=Since&message=2015-10-03&color=green&.png?}} |Path to the git binary (if empty, the default "/usr/bin/git" will be used). | 
- +|''addParams'' |Specify additional parameters for the git binary. For example, if you cannot set default git configuration values for the webserver's system user you can add some basic information by specifying additional parameters.\\ For example ''%%-c http.sslVerify=false -c user.email="<%mail%>" -c user.name="%user%"%%'' deactivates the SSL certificate check and specifies the user's email and name which are used as commit author.\\ The value in ''addParams'' is placed directly after the git binary for the git command executed by gitbacked.\\ The variables ''%mail%'' and ''%user%'' can be used as placeholders and are replaced by the corresponding properties configured for the DokuWiki user being logged in.\\ {{https://img.shields.io/static/v1?label=Since&message=2022-02-06&color=green&.png?}} default=''%%-c user.name="%user%" -c user.email="<%mail%>"%%''
-  * ''periodicMinutes'' +|''emailAddressOnError''\\ {{https://img.shields.io/static/v1?label=Since&message=2021-03-19&color=green&.png?}} |If defined, in case of a git error an eMail will be sent to this address rather than confusing the end user by the Exception raised. Multiple mail addresses can be configured comma separated. | 
- +|''notifyByMailOnSuccess''\\ {{https://img.shields.io/static/v1?label=Since&message=2021-03-19&color=green&.png?}} |If set, an eMail will be sent on any git commitThis is supposed to be used for eMail notification test purposes only. |
-Defines the period (in minutes) for the periodic pull request executions. +
- +
-  * ''commitMsg''''commitMsgDel''''commitMediaMsg''''commitMediaMsgDel'' +
- +
-The template strings which are used for the different commit messages (page edits, media edits, page deletion, media deletion). The variables ''%page%'',''%media%'', ''%summary%'' and ''%user%'' can be used and are replaced with the corresponding values during the commit process. +
- +
-  * ''repoPath'' +
- +
-The path to your git repository (root) -- set to the [[config:savedir]] by default (''./data'').\\ +
-This must be configured either as a relative path (relative to the [[config:savedir]]) or as an absolute path.\\ +
-{{:wiki:usersmileys:button-note-yellow.png?72|}} Absolute path configuration is supported since release **2023-03-07**. +
- +
-  * ''repoWorkDir'' +
- +
-This path is passed to the git command as the ''–work-tree'' commandline option if it is configured.\\ +
-It can be configured as relative path (relative to the [[config:savedir]]) or as an absolute path.\\ +
-{{:wiki:usersmileys:button-note-yellow.png?72|}} Since release **2023-03-07** you should configure this only if you are aware about the impact. +
- +
-  * ''ignorePaths'' +
- +
-Paths or files (comma separated) that will be ignored and not added by git (currently simple wildcard string matching of paths is performed). +
- +
-  * ''gitPath'' +
- +
-Path to the git binary (if empty, the default "/usr/bin/git" will be used). +
- +
-  * ''addParams'' +
- +
-Specify additional parameters for the git binary. For example, if you cannot set default git configuration values for the webserver's system user you can add some basic information by specifying additional parameters. e.g. ''%%-c http.sslVerify=false -c user.email="<%mail%>" -c user.name="%user%"%%'' deactivates the SSL certificate check and specify the user's email and name which are used for the commits. The value in ''addParams'' is placed directly after the git binary when executing some git command. The variables ''%mail%'' and ''%user%'' can be used and are replaced with the corresponding values before being passed on to git.+
  
 ===== Known Bugs and Issues ===== ===== Known Bugs and Issues =====
plugin/gitbacked.1683494324.txt.gz · Last modified: 2023-05-07 23:18 by mhoffrogge

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki