Initial commit

This commit is contained in:
askiiart 2023-09-25 10:09:02 -05:00
commit 5b064a14b3
No known key found for this signature in database
GPG key ID: 94789D499CBE78CE
4 changed files with 63 additions and 0 deletions

14
.drone.yml Normal file
View file

@ -0,0 +1,14 @@
kind: pipeline
name: default
steps:
- name: build and publish
image: plugins/docker
pull: always
settings:
repo: askiiart/tinyfeed
tags: latest
username:
from_secret: docker_username
password:
from_secret: docker_password

5
Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM golang:alpine
RUN go install github.com/TheBigRoomXXL/tinyfeed@latest
WORKDIR /data
COPY run.sh /data/run.sh
CMD ["/data/run.sh"]

37
README.md Normal file
View file

@ -0,0 +1,37 @@
# docker-createrepo_c
[![Build Status](https://drone.askiiart.net/api/badges/askiiart/docker-tinyfeed/status.svg?ref=refs/heads/main)](https://drone.askiiart.net/askiiart/docker-tinyfeed)
`tinyfeed` in a Docker container
## Running
Example `docker run`:
```bash
docker run -d -e INTERVAL=300 -v /path/to/feeds.txt:/data/feeds.txt -v /path/to/html:/html docker.askiiart.net/askiiart/tinyfeed
```
Example `docker-compose.yml`:
```yaml
version: '3.7'
services:
tinyfeed:
image: docker.askiiart.net/askiiart/tinyfeed
environment:
- INTERVAL=300
volumes:
- /path/to/feeds.txt:/data/feeds.txt
- /path/to/html:/html
```
## Environment Variables
| Variable | Description |
| ---------- | ------------------------------------- |
| `INTERVAL` | How often to run tinyfeed, in seconds |
## Building
1. Run `docker build .`

7
run.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
set -e
while :
do
cat /data/feeds.txt | tinyfeed > /tmp/index.html && mv /tmp/index.html /html/index.html
sleep $INTERVAL
done