Miniflux: Init
This commit is contained in:
parent
d3d04a3536
commit
f925b71673
2 changed files with 52 additions and 0 deletions
45
cfg/jobs/miniflux.run
Executable file
45
cfg/jobs/miniflux.run
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/env bash
|
||||
# Upstream doc: https://miniflux.app/docs/debian.html
|
||||
set -euxo pipefail
|
||||
|
||||
IMAGE="ubuntu/24.04"
|
||||
DIST="${IMAGE%%/*}"
|
||||
VER="${IMAGE#*/}"
|
||||
VER="${VER%/*}"
|
||||
VER="${VER//./-}"
|
||||
UPSTREAM_VER="2.2.5"
|
||||
UPSTREAM_VER_DASH="${UPSTREAM_VER//[.+]/-}"
|
||||
UPSTREAM_NAME="miniflux"
|
||||
SERIAL="1benoitjpnet"
|
||||
CNAME="$UPSTREAM_NAME-$UPSTREAM_VER_DASH-$SERIAL-$DIST-$VER"
|
||||
ALIAS="$UPSTREAM_NAME-$UPSTREAM_VER-$SERIAL"
|
||||
|
||||
cd "$WORKSPACE"
|
||||
incus launch images:$IMAGE "$CNAME" --quiet
|
||||
|
||||
wait_network "$CNAME"
|
||||
|
||||
incus exec "$CNAME" -- bash -c 'echo "deb [trusted=yes] https://repo.miniflux.app/apt/ * *" > /etc/apt/sources.list.d/miniflux.list'
|
||||
incus exec "$CNAME" -- apt update
|
||||
incus exec "$CNAME" -- apt upgrade -y
|
||||
incus exec "$CNAME" -- apt install -y --no-install-recommends \
|
||||
miniflux=${UPSTREAM_VER} \
|
||||
postgresql
|
||||
|
||||
set +x
|
||||
PG_PASS=$(openssl rand -hex 32)
|
||||
incus file push <(sed "s/SED_PG_PASS/$PG_PASS/" "$WORKSPACE"/miniflux.conf) \
|
||||
"$CNAME"/etc/miniflux.conf
|
||||
set -x
|
||||
incus exec "$CNAME" -- bash -c 'sudo -u postgres psql -c "CREATE USER miniflux WITH PASSWORD '"'"'${PG_PASS}'"'"';"'
|
||||
incus exec "$CNAME" -- bash -c 'sudo -u postgres psql -c "CREATE DATABASE miniflux OWNER miniflux;"'
|
||||
|
||||
incus exec "$CNAME" -- systemctl enable miniflux
|
||||
|
||||
laminarc run incus_publish \
|
||||
CNAME="$CNAME" \
|
||||
UPSTREAM_NAME=$UPSTREAM_NAME \
|
||||
UPSTREAM_VER=$UPSTREAM_VER \
|
||||
IMAGE=$IMAGE \
|
||||
SERIAL=$SERIAL \
|
||||
ALIAS=$ALIAS
|
7
run/miniflux/workspace/miniflux.conf
Normal file
7
run/miniflux/workspace/miniflux.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
# See https://miniflux.app/docs/configuration.html
|
||||
|
||||
RUN_MIGRATIONS=1
|
||||
PROXY_IMAGES=all
|
||||
DATABASE_URL=user=miniflux password=SED_PG_PASS dbname=miniflux
|
||||
BASE_URL=http://localhost
|
||||
LISTEN_ADDR=0.0.0.0:8080
|
Loading…
Add table
Reference in a new issue