docker: fix cgi & sh location, README

This commit is contained in:
dongdigua 2023-06-27 14:18:32 +08:00
parent d991961b60
commit 5b76e96985
6 changed files with 11 additions and 9 deletions

View File

@ -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

View File

@ -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:

View File

@ -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";

View File

@ -1,4 +1,4 @@
#! /usr/bin/sh
#! /bin/sh
if test -f /etc/ssl/gmid.pem; then
echo "OK certificate exists"

View File

@ -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 $?

View File

@ -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