mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-30 23:30:53 +08:00
docker: fix cgi & sh location, README
This commit is contained in:
parent
d991961b60
commit
5b76e96985
@ -13,7 +13,7 @@ RUN git clone https://github.com/dongdigua/dongdigua.github.io.git --depth 1 \
|
||||
|
||||
COPY run-wrapper.sh .
|
||||
COPY gmid.conf /dongdigua.github.io/gmi/docker/
|
||||
COPY cgi/* /dongdigua.github.io/gmi/docker/cgi/
|
||||
COPY cgi/* /dongdigua.github.io/cgi/
|
||||
COPY update-git.sh /etc/periodic/hourly/
|
||||
|
||||
# for testing purpose only
|
||||
|
@ -5,12 +5,11 @@ alpine linux
|
||||
=> https://weinan.io/2019/04/06/cron.html cron
|
||||
|
||||
## Server Program
|
||||
=> https://github.com/mbrubeck/agate agate
|
||||
|
||||
alternatives:
|
||||
=> https://gmid.omarpolo.com gmid
|
||||
=> https://tildegit.org/solene/vger vger
|
||||
|
||||
## Hot Update
|
||||
* git pull
|
||||
* gmid.conf reload
|
||||
|
||||
## TODO
|
||||
CGI script:
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /usr/bin/sh
|
||||
#! /bin/sh
|
||||
|
||||
printf "20 text/gemini\r\n";
|
||||
printf "OS: $(uname -rv)\r\nuptime: $(uptime)\r\nserver: $SERVER_SOFTWARE\r\nauth: $AUTH\r\n";
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /usr/bin/sh
|
||||
#! /bin/sh
|
||||
|
||||
if test -f /etc/ssl/gmid.pem; then
|
||||
echo "OK certificate exists"
|
||||
|
@ -1,10 +1,12 @@
|
||||
#! /bin/sh
|
||||
|
||||
sh genkey.sh
|
||||
REPO=/dongdigua.github.io
|
||||
|
||||
$REPO/gmi/docker/genkey.sh
|
||||
|
||||
crond -f -d 8 &
|
||||
tail -f /var/log/git.log &
|
||||
gmid -f -c /dongdigua.github.io/gmi/docker/gmid.conf -Dgem_host=$GEMINI_HOST
|
||||
gmid -f -c $REPO/gmi/docker/gmid.conf -Dgem_host=$GEMINI_HOST
|
||||
|
||||
wait -n
|
||||
echo $?
|
||||
|
@ -3,4 +3,5 @@
|
||||
cd /dongdigua.github.io
|
||||
git pull --rebase >> /var/log/git.log 2>&1
|
||||
python misc/mdlist2gmi.py > posts.gmi
|
||||
cp -r gmi/docker/cgi .
|
||||
pkill -HUP gmid
|
||||
|
Loading…
Reference in New Issue
Block a user