feat: include feed generation
All checks were successful
continuous-integration/drone/push Build is passing

See ruangrupa/living-room#20.
This commit is contained in:
cellarspoon 2022-01-05 13:48:54 +01:00
parent 696e5634f1
commit 595eee3bc0
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410
4 changed files with 37 additions and 2 deletions

View File

@ -23,6 +23,7 @@ See the `sleep ...` statements in the [`compose.yml`](./compose.yml).
- `docker service logs -f beta_lumbung_space_peertube`
- `docker service logs -f beta_lumbung_space_calendar`
- `docker service logs -f beta_lumbung_space_feed`
Where `beta_lumbung_space_<service-name>` and you see the service name in the [`compose.yml`](./compose.yml).
@ -47,6 +48,9 @@ lumbunglib-cal
export OUTPUT_DIR=content/video
lumbunglib-vid
export OUTPUT_DIR=content/feed
lumbunglib-feed # reads ./feeds_list.txt
```
Afterwards, you can automatically run it with `make gen`.
@ -62,3 +66,7 @@ Afterwards, you can automatically run it with `make gen`.
(requires `lumbung.space` docker context)
- `make deploy`
### Deploy a new `feeds_list.txt`
- Increment the `_v<n>` (e.g. `v1` -> `v2`) in [`compose.yml`](./compose.yml) `configs` to avoid any deployment error

View File

@ -68,9 +68,34 @@ services:
done
"
feed:
image: decentral1se/beta.lumbung.space-scripts:latest
volumes:
- content:/src/content
configs:
- source: feeds_list
target: /src/feeds_list.txt
environment:
OUTPUT_DIR: /src/content/feed
command: |
bash -c "
while true
do
echo 'generating feed posts...'
lumbunglib-feed
echo 'going to sleep for 5 minutes...'
sleep 300
done
"
volumes:
content:
networks:
proxy:
external: true
configs:
feeds_list:
name: beta_lumbung_space_feeds_list_v1
file: feeds_list.txt

1
feeds_list.txt Normal file
View File

@ -0,0 +1 @@
https://artivismo.org/feed/

View File

@ -7,14 +7,15 @@ gen:
@CALENDAR_URL="https://cloud.lumbung.space/remote.php/dav/public-calendars/WbnHM8YdCkKT6bcT?export"; \
OUTPUT_DIR=content/calendar; \
lumbunglib-cal && \
OUTPUT_DIR=content/video lumbunglib-vid
OUTPUT_DIR=content/video lumbunglib-vid && \
OUTPUT_DIR=content/feed lumbunglib-feed
push-hugo:
@docker build -t decentral1se/beta.lumbung.space -f Dockerfile.hugo . && \
docker push decentral1se/beta.lumbung.space
push-scripts:
@docker build -t decentral1se/beta.lumbung.space-scripts -f Dockerfile.scripts . && \
@docker build --no-cache -t decentral1se/beta.lumbung.space-scripts -f Dockerfile.scripts . && \
docker push decentral1se/beta.lumbung.space-scripts
deploy: