feat: add content generation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See ruangrupa/living-room#17.
This commit is contained in:
parent
ce3e864008
commit
d92732109f
16
.drone.yml
16
.drone.yml
@ -2,7 +2,7 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: continuous deployment
|
name: continuous deployment
|
||||||
steps:
|
steps:
|
||||||
- name: build image
|
- name: push hugo image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
@ -13,6 +13,17 @@ steps:
|
|||||||
repo: decentral1se/beta.lumbung.space
|
repo: decentral1se/beta.lumbung.space
|
||||||
tags: latest
|
tags: latest
|
||||||
|
|
||||||
|
- name: push scripts image
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_reg_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_reg_passwd
|
||||||
|
dockerfile: Dockerfile.scripts
|
||||||
|
repo: decentral1se/beta.lumbung.space-scripts
|
||||||
|
tags: latest
|
||||||
|
|
||||||
- name: deploy stack
|
- name: deploy stack
|
||||||
image: decentral1se/stack-ssh-deploy:latest
|
image: decentral1se/stack-ssh-deploy:latest
|
||||||
settings:
|
settings:
|
||||||
@ -20,6 +31,9 @@ steps:
|
|||||||
host: lumbung.space
|
host: lumbung.space
|
||||||
deploy_key:
|
deploy_key:
|
||||||
from_secret: drone_ssh_lumbung.space
|
from_secret: drone_ssh_lumbung.space
|
||||||
|
depends_on:
|
||||||
|
- push hugo image
|
||||||
|
- push scripts image
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
11
Dockerfile.scripts
Normal file
11
Dockerfile.scripts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM python:3.9.9-alpine
|
||||||
|
|
||||||
|
RUN apk add --no-cache git bash
|
||||||
|
|
||||||
|
WORKDIR /src/
|
||||||
|
|
||||||
|
RUN git clone https://git.autonomic.zone/ruangrupa/lumbunglib /src/
|
||||||
|
|
||||||
|
RUN pip install -U setuptools pip
|
||||||
|
|
||||||
|
RUN pip install .
|
35
compose.yml
35
compose.yml
@ -33,6 +33,41 @@ services:
|
|||||||
- "traefik.http.services.coop-cloud-site.loadbalancer.server.port=1313"
|
- "traefik.http.services.coop-cloud-site.loadbalancer.server.port=1313"
|
||||||
- "traefik.http.routers.coop-cloud-site.tls.certresolver=production"
|
- "traefik.http.routers.coop-cloud-site.tls.certresolver=production"
|
||||||
|
|
||||||
|
peertube:
|
||||||
|
image: decentral1se/beta.lumbung.space-scripts:latest
|
||||||
|
volumes:
|
||||||
|
- content:/src/content
|
||||||
|
environment:
|
||||||
|
OUTPUT_DIR: /src/content/video
|
||||||
|
command: |
|
||||||
|
bash -c "
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
echo 'generating peertube posts...'
|
||||||
|
lumbunglib-vid
|
||||||
|
echo 'going to sleep for 5 minutes...'
|
||||||
|
sleep 300
|
||||||
|
done
|
||||||
|
"
|
||||||
|
|
||||||
|
calendar:
|
||||||
|
image: decentral1se/beta.lumbung.space-scripts:latest
|
||||||
|
volumes:
|
||||||
|
- content:/src/content
|
||||||
|
environment:
|
||||||
|
OUTPUT_DIR: /src/content/video
|
||||||
|
CALENDAR_URL: "https://cloud.lumbung.space/remote.php/dav/public-calendars/WbnHM8YdCkKT6bcT?export"
|
||||||
|
command: |
|
||||||
|
bash -c "
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
echo 'generating calendar posts...'
|
||||||
|
lumbunglib-cal
|
||||||
|
echo 'going to sleep for 5 minutes...'
|
||||||
|
sleep 300
|
||||||
|
done
|
||||||
|
"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
content:
|
content:
|
||||||
|
|
||||||
|
4
makefile
4
makefile
@ -13,4 +13,8 @@ push-hugo:
|
|||||||
@docker build -t decentral1se/beta.lumbung.space -f Dockerfile.hugo . && \
|
@docker build -t decentral1se/beta.lumbung.space -f Dockerfile.hugo . && \
|
||||||
docker push decentral1se/beta.lumbung.space
|
docker push decentral1se/beta.lumbung.space
|
||||||
|
|
||||||
|
push-scripts:
|
||||||
|
@docker build -t decentral1se/beta.lumbung.space-scripts -f Dockerfile.scripts . && \
|
||||||
|
docker push decentral1se/beta.lumbung.space-scripts
|
||||||
|
|
||||||
.PHONY: serve gen push-hugo
|
.PHONY: serve gen push-hugo
|
||||||
|
Loading…
Reference in New Issue
Block a user