Compare commits

...

8 Commits

Author SHA1 Message Date
joeac 3d28103804 capsule.Dockerfile: don't bother making feeds ahead of 'make all' 2026-04-30 17:28:36 +01:00
joeac 7f37fd666d capsule.Dockerfile uses run.sh 2026-04-30 17:27:53 +01:00
joeac f8f9573410 can run capsule with capsule/run.sh 2026-04-30 17:27:35 +01:00
joeac 144f3ed14d capsule.Dockerfile: uses Makefile 2026-04-30 17:20:50 +01:00
joeac 1492a916e9 updates comment in capsule.Dockerfile 2026-04-30 17:19:40 +01:00
joeac 260216c685 fix Makefile 2026-04-30 17:18:18 +01:00
joeac 2254ce56f6 gitignore comitium generated files 2026-04-30 17:13:34 +01:00
joeac 9cb1499561 add Makefile for capsule 2026-04-30 17:12:42 +01:00
4 changed files with 37 additions and 12 deletions
+5 -12
View File
@@ -22,24 +22,17 @@ RUN crontab -l > crontab.tmp \
&& crontab crontab.tmp \
&& rm crontab.tmp
# bash is needed to run build_loglog.bash
# bash is needed to run the build scripts
# busybox-openrc provides rc-service, which runs crond
# gcc is a dependency for agate
RUN apk --no-cache add bash busybox-openrc gcc
# make is needed to run the Makefile
RUN apk --no-cache add bash busybox-openrc gcc make
RUN rc-update add crond
COPY --from=agate /root/.cargo/bin/agate /usr/local/bin/agate
COPY --from=comitium /usr/local/bin/comitium /usr/local/bin/comitium
COPY capsule/comitium-data comitium-data
RUN while read feed; do \
comitium add --data comitium-data/ "$feed"; \
done <comitium-data/feeds.txt
COPY capsule .
COPY common /var/common
RUN ./build_microlog.bash
RUN ./build_longlog.bash
RUN ./build_loglog.bash
RUN make
CMD \
( ( sleep 5; comitium refresh --data comitium-data/ ) & ) \
&& agate --content content/ --addr [::]:1965 --addr 0.0.0.0:1965 --lang en-GB
CMD ./run.sh
+3
View File
@@ -3,3 +3,6 @@ content/logs/microlog.gmi
content/logs/longlog.gmi
content/logs/loglog.gmi
tmp-build-loglog-*
comitium-data/feed.gmi
comitium-data/subscriptions.gmi
comitium-data/comitium.json
+24
View File
@@ -0,0 +1,24 @@
COMITIUM_DATA := comitium-data
TEMPLATES_DIR := templates
MICROLOG_HEADER := $(TEMPLATES_DIR)/microlog-header.gmi
LONGLOG_HEADER := $(TEMPLATES_DIR)/longlog-header.gmi
LOGLOG_HEADER := $(TEMPLATES_DIR)/loglog-header.gmi
MICROLOG_ENTRIES := $(wildcard microlog/*)
LONGLOG_ENTRIES := $(wildcard content/logs/longlog/*)
all: microlog loglog longlog add_feeds
microlog: $(MICROLOG_ENTRIES) $(MICROLOG_HEADER)
bash ./build_microlog.bash
longlog: $(LONGLOG_ENTRIES) $(LONGLOG_HEADER)
bash ./build_longlog.bash
loglog: microlog longlog $(LOGLOG_HEADER)
bash ./build_loglog.bash
add_feeds: $(COMITIUM_DATA)/feeds.txt
rm -f $(COMITIUM_DATA)/comitium.json
while read feed; do \
comitium add --data "$(COMITIUM_DATA)" $$feed; \
done <$(COMITIUM_DATA)/feeds.txt
Executable
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
make && \
( ( sleep 5; comitium refresh --data comitium-data/ ) & ) \
&& agate --content content/ --addr [::]:1965 --addr 0.0.0.0:1965 --lang en-GB