Commit a1195a4f authored by Jonathan Dowland's avatar Jonathan Dowland
Browse files

expose more git repos

Set up git repos for templates, libdir, setup, move files around
and expose those repos via git/HTTP.
parent 4be30d86
......@@ -59,7 +59,7 @@ RUN chown ikiwiki \
USER ikiwiki
# USER ikiwiki stuff #########################################################
RUN mkdir -p var/log/lighttpd var/run var/cache/lighttpd/compress
RUN mkdir -p var/log/lighttpd var/run var/cache/lighttpd/compress git
# more todo
RUN git config --global user.name "ikiwiki-in-a-box automator" \
......@@ -69,13 +69,18 @@ RUN git config --global user.name "ikiwiki-in-a-box automator" \
# set up htpasswd file (TODO: get Ikiwiki to read it too)
RUN htpasswd -cb /home/ikiwiki/htpasswd admin password
RUN cd Ikiwiki-in-a-box.git && git config http.receivepack true
# destdir (for e.g. external httpd)
# NOTE: permissions are fucked.
#VOLUME ["/home/ikiwiki/public_html/Ikiwiki-in-a-box"]
## repository (to push to)
#VOLUME ["/home/ikiwiki/Ikiwiki-in-a-box.git"]
# Set up git repos for libdir (plugins) and templates (page templates)
RUN sh -xc 'for r in libdir templates; do \
GIT_DIR=git/$r.git git init \
&& git clone git/$r.git $r \
&& echo "cd /home/ikiwiki/$r && git pull" > git/$r.git/hooks/post-update \
&& chmod +x git/$r.git/hooks/post-update \
; done'
# fix git repo settings for access via HTTP
RUN sh -xc 'for r in git/*.git; do \
( cd $r && git config http.receivepack true && git config receive.denynonfastforwards false ) \
; done'
EXPOSE 8080
CMD /usr/sbin/lighttpd -Df /home/ikiwiki/lighttpd.conf
......@@ -16,7 +16,7 @@ IkiWiki::Setup::Automator->import(
rcs => $rcs,
srcdir => "$ENV{HOME}/$wikiname_short",
destdir => "$ENV{HOME}/public_html",
repository => "$ENV{HOME}/$wikiname_short.git",
repository => "$ENV{HOME}/git/ikiwiki.git",
dumpsetup => "$ENV{HOME}/$wikiname_short.setup",
url => "http://localhost/",
cgiurl => "http://localhost/ikiwiki",
......@@ -24,7 +24,8 @@ IkiWiki::Setup::Automator->import(
adminemail => "admin\@$domain",
add_plugins => [qw{goodstuff websetup}],
disable_plugins => [qw{}],
libdir => "$ENV{HOME}/.ikiwiki",
libdir => "$ENV{HOME}/libdir",
templatedir => "$ENV{HOME}/templates",
rss => 1,
atom => 1,
syslog => 0,
......
......@@ -39,7 +39,7 @@ alias.url += ( "/git" => "/usr/lib/git-core/git-http-backend" )
$HTTP["url"] =~ "^/git" {
cgi.assign = ("" => "")
setenv.add-environment = (
"GIT_PROJECT_ROOT" => "/home/ikiwiki/Ikiwiki-in-a-box.git",
"GIT_PROJECT_ROOT" => "/home/ikiwiki/git",
"GIT_HTTP_EXPORT_ALL" => ""
)
$HTTP["querystring"] =~ "service=git-receive-pack" {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment