An automatic build/publish service for Pelican website in docker
docker pull ray1ex/pelican-publisher
Create file pelican-publisher.env
PELICAN_PUBLISHER_DOMAIN=pelican-publisher.rexzhang.com
PELICAN_SITES=[{"NAME":"rexzhang.com","ZIP_URL":"https://github.com/rexzhang/rexzhang.com/archive/master.zip","WEBHOOK_SECRET":"please-change-it-!"},{"NAME":"sample.com","ZIP_URL":"https://sample.com/master.zip","WEBHOOK_SECRET":"secret"}]
PELICAN_PUBLISHER_DOMAIN
is your publisher host's domain, empty will accept any domainPELICAN_PUBLISHER_PREFIX
is your URL prefix pathPELICAN_SITES
in JSON format, empty is[]
SENTRY_DSN
is your sentry client key (DSN)
docker run -dit -p 127.0.0.1:8000:8000 --restart unless-stopped \
-v=/var/www:/output -v=$(pwd)/data:/data \
--env-file pelican-publisher.env \
--name pelican-publisher ray1ex/pelican-publisher
- Your site will output to path
/var/www/SITE_NAME
- Your database file db.sqlite3 will at
$(pwd)/data/db.sqlite3
- Github
- Payload URL: like this
https://pelican-publisher.rexzhang.com/webhook/github/rexzhang.com
- Content type: application/json
- Payload URL: like this
instance | https://pelican-publisher.rexzhang.com |
---|---|
source | https://github.com/rexzhang/rexzhang.com |
target | https://rexzhang.com |
- processing task info
http:https://127.0.0.1:8000/webhook/test
trigger task
build_pelican_site_task