fix: resolve config.yml.tmpl templating #4
Open
jaeger123
wants to merge 2 commits from
jaeger123/miniflux:fix/config-templating into main
pull from: jaeger123/miniflux:fix/config-templating
merge into: :main
:main
:renovate/configure
:test_recipe_updates
No Reviewers
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
appletalk
arjan
basebuilder
BornDeleuze
Brooke
carla
cas (Cassowary)
codegod100
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
flancian
Frando
iexos
jade (Jade Ambrose)
javielico (Javielico)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
marlon (marlon)
mayel
mirsal
moosemower
moritz
nicksellen (Nick Sellen)
notplants
oxaliq (sorrel)
p4u1
pau
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
PhiNatalie
renovate-bot (Comrade Renovate Bot)
ripclap
rix
rscmbbng
sef (sef)
simon
sixsmith (Sixsmith)
stevensting
tobias
trav (Trav Fryer)
val (val (he/him))
vaznasty
virtualboys
wolcen (Chris Thompson)
wykwit
xynosis
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/miniflux#4
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
config.yml.tmplis now aligned with Miniflux's actual config format (flatKEY=VALUE, real Miniflux keys), all{{ env "..." }}/{{ secret "..." }}directives resolve, and the container actually loads the file via-c.Changes
config.yml.tmpl— rewritten from TOML-style (which Miniflux ignores) to flatKEY=VALUEwith real Miniflux keys:DATABASE_URL,LISTEN_ADDR,BASE_URL,RUN_MIGRATIONS,CREATE_ADMIN,ADMIN_USERNAME,ADMIN_PASSWORD. Infra constants (LISTEN_ADDR=0.0.0.0:8080,sslmode=disable,dbhostname,RUN_MIGRATIONS=1,CREATE_ADMIN=1) hardcoded in the template since they don't vary per deploy..env.sample— only user-tunable values (DOMAIN,DB_NAME,DB_USER,MINIFLUX_ADMIN_USERNAME) + version pins. No more pre-filled defaults for infra constants likeDB_HOST=dborPORT=8080.compose.yml— addcommand: ["-c", "/etc/miniflux/config.yml"]; remove 5 env entries that previously shadowed the config (DATABASE_URL,ADMIN_USERNAME,ADMIN_PASSWORD,BASE_URL,RUN_MIGRATIONS). Config file is now authoritative.compose.postgres.yml— healthcheck had{{ env 'DB_USER' }}(single quotes, rejected by Go templates). Fixed to escaped double quotes.Usage
How templating resolves: abra reads
.env→ Docker Swarm'stemplate_driver: golang(seecompose.ymlconfigs:block) rendersconfig.yml.tmpl, substituting{{ env "X" }}from the env file and{{ secret "X" }}from Swarm secrets → mounted read-only at/etc/miniflux/config.yml→ loaded by Miniflux via the-cflag.Verify:
Expected output:
No leftover
{{ ... }}directives.Version bumps: any change to
config.yml.tmplrequires bumpingCONFIG_VERSIONin.env(Swarm configs are immutable by name). Rotating a secret requires bumping itsSECRET_*_VERSION.Note
secret_keyis still declared incompose.ymlsecrets block but not referenced in the template — Miniflux has no matching config key. Left the mount in place rather than deleting the secret definition; can be cleaned up in a follow-up if confirmed unused.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.