Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rexzhang/pelican-publisher
An automatic build/publish service for pelican website in docker
https://github.com/rexzhang/pelican-publisher
docker pelican static-site-generator
Last synced: about 2 months ago
JSON representation
An automatic build/publish service for pelican website in docker
- Host: GitHub
- URL: https://github.com/rexzhang/pelican-publisher
- Owner: rexzhang
- License: mit
- Created: 2020-03-25T10:11:50.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T07:17:23.000Z (9 months ago)
- Last Synced: 2024-04-10T08:30:00.556Z (9 months ago)
- Topics: docker, pelican, static-site-generator
- Language: Python
- Homepage:
- Size: 295 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# Pelican Publisher
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
An automatic build/publish service for [Pelican](https://getpelican.com) website in docker
## Install
```shell
docker pull ray1ex/pelican-publisher
```## Configuration
Create file `pelican-publisher.env`
```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 domain
- `PELICAN_PUBLISHER_PREFIX` is your URL prefix path
- `PELICAN_SITES` in JSON format, empty is `[]`
- `SENTRY_DSN` is your sentry client key (DSN)## Start Service
```shell
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`## Setup Webhook
- Github
- Payload URL: like this
`https://pelican-publisher.rexzhang.com/webhook/github/rexzhang.com`
- Content type: application/json## Example
| instance | |
|-------------------|------------------------------------------|
| source | |
| target | |## TODO
- processing task info
## Development
`http://127.0.0.1:8000/webhook/test` trigger task
`build_pelican_site_task`