Compare commits
5 commits
3ec5d3260e
...
d80e13b6fc
Author | SHA1 | Date | |
---|---|---|---|
d80e13b6fc | |||
2d6220b055 | |||
8c8519055b | |||
0ea318004a | |||
e34a6e96e1 |
4 changed files with 47 additions and 9 deletions
|
@ -19,9 +19,10 @@ ENV LANG en_US.utf8
|
||||||
ENV GITIT_VERSION 0.12.3.1+dfsg-1
|
ENV GITIT_VERSION 0.12.3.1+dfsg-1
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-cache policy gitit openssh-client \
|
&& apt-cache policy gitit \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
libghc-filestore-data mime-support gitit=$GITIT_VERSION \
|
libghc-filestore-data mime-support gitit=$GITIT_VERSION \
|
||||||
|
openssh-client \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
41
README.md
41
README.md
|
@ -1,10 +1,43 @@
|
||||||
|
# Usage
|
||||||
|
|
||||||
Please define the following variables
|
Please define the following environment variables
|
||||||
|
|
||||||
GITIT_USER_EMAIL: glenux@glenux.net
|
* GITIT_USER_EMAIL: jon.smith@example.com
|
||||||
GITIT_USER_NAME: Glenn Y. Rolland
|
* GITIT_USER_NAME: Jon Smith
|
||||||
|
* GITIT_REMOTE_REPOSITORY: git@example.com/jon.smith/somewhere
|
||||||
|
* GITIT_REMOTE_DOMAIN: example.com
|
||||||
|
|
||||||
Please mount the following volumes
|
Please mount the following volumes
|
||||||
|
|
||||||
/var/lib/dokku/data/storage/cryptochemists-wiki-prod => /data
|
* /path/to/your/data => /data
|
||||||
|
|
||||||
|
It is also strongly advised to run a cron task to mirror the wiki on a regular
|
||||||
|
basis
|
||||||
|
|
||||||
|
# server cron jobs
|
||||||
|
MAILTO="admin@server.com"
|
||||||
|
PATH=/usr/local/bin:/usr/bin:/bin
|
||||||
|
SHELL=/bin/bash
|
||||||
|
|
||||||
|
# m h dom mon dow username command
|
||||||
|
# * * * * * dokku command to be executed
|
||||||
|
# - - - - -
|
||||||
|
# | | | | |
|
||||||
|
# | | | | +----- day of week (0 - 6) (Sunday=0)
|
||||||
|
# | | | +------- month (1 - 12)
|
||||||
|
# | | +--------- day of month (1 - 31)
|
||||||
|
# | +----------- hour (0 - 23)
|
||||||
|
# +----------- min (0 - 59)
|
||||||
|
|
||||||
|
### HIGH TRAFFIC TIME IS B/W 00:00 - 04:00 AND 14:00 - 23:59
|
||||||
|
### RUN YOUR TASKS FROM 04:00 - 14:00
|
||||||
|
### KEEP SORTED IN TIME ORDER
|
||||||
|
|
||||||
|
### PLACE ALL CRON TASKS BELOW
|
||||||
|
|
||||||
|
# removes unresponsive users from the subscriber list to decrease bounce rates
|
||||||
|
0 * * * * docker run --rm thecontainer sh -c "cd wikidata && git push --set-upstream origin master"
|
||||||
|
|
||||||
|
### PLACE ALL CRON TASKS ABOVE, DO NOT REMOVE THE WHITESPACE AFTER THIS LINE
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
---
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
|
||||||
|
wiki:
|
||||||
gitit:
|
gitit:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
@ -8,7 +10,9 @@ services:
|
||||||
GIT_COMMITTER_NAME: "Collapse Wiki"
|
GIT_COMMITTER_NAME: "Collapse Wiki"
|
||||||
GIT_COMMITTER_EMAIL: "admin@collapse.wiki"
|
GIT_COMMITTER_EMAIL: "admin@collapse.wiki"
|
||||||
volumes:
|
volumes:
|
||||||
- ./wiki:/data
|
- wiki_data:/data
|
||||||
ports:
|
ports:
|
||||||
- 5001:5001
|
- 5001:5001
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
wiki_data:
|
||||||
|
|
|
@ -55,9 +55,9 @@ if [ -n "$GITIT_REMOTE_REPOSITORY" ]; then
|
||||||
|
|
||||||
mkdir -p /root/.ssh
|
mkdir -p /root/.ssh
|
||||||
cat > /root/.ssh/config <<-MARK
|
cat > /root/.ssh/config <<-MARK
|
||||||
Host github.com
|
Host $GITIT_REMOTE_DOMAIN
|
||||||
User git
|
|
||||||
IdentityFile /data/ssh/mirror_rsa
|
IdentityFile /data/ssh/mirror_rsa
|
||||||
|
StrictHostKeyChecking no
|
||||||
MARK
|
MARK
|
||||||
chmod 600 /root/.ssh/config
|
chmod 600 /root/.ssh/config
|
||||||
chmod 700 /root/.ssh
|
chmod 700 /root/.ssh
|
||||||
|
|
Loading…
Add table
Reference in a new issue