bundles/miniflux: introduce
This commit is contained in:
parent
366374b4e5
commit
ececab44b4
6 changed files with 89 additions and 13 deletions
6
bundles/miniflux/files/miniflux.conf
Normal file
6
bundles/miniflux/files/miniflux.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
DATABASE_URL="user=miniflux password=${dbpassword} dbname=miniflux sslmode=disable host=localhost"
|
||||
LISTEN_ADDR=127.0.0.1:22040
|
||||
POLLING_FREQUENCY=15
|
||||
BATCH_SIZE=100
|
||||
WORKER_POOL_SIZE=5
|
||||
BASE_URL=https://${base_url}/
|
2
bundles/miniflux/files/override.conf
Normal file
2
bundles/miniflux/files/override.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[Service]
|
||||
ExecStartPre=/usr/bin/miniflux -migrate
|
30
bundles/miniflux/items.py
Normal file
30
bundles/miniflux/items.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
files = {
|
||||
'/etc/miniflux.conf': {
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'dbpassword': node.metadata['postgresql']['users']['miniflux']['password'],
|
||||
'base_url': node.metadata['miniflux']['domain'],
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:miniflux:restart',
|
||||
},
|
||||
},
|
||||
'/etc/systemd/system/miniflux.service.d/bundlewrap.conf': {
|
||||
'source': 'override.conf',
|
||||
'triggers': {
|
||||
'action:systemd-reload',
|
||||
'svc_systemd:miniflux:restart',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd = {
|
||||
'miniflux': {
|
||||
'needs': {
|
||||
'file:/etc/miniflux.conf',
|
||||
'file:/etc/systemd/system/miniflux.service.d/bundlewrap.conf',
|
||||
'pkg_apt:miniflux',
|
||||
'postgres_role:miniflux',
|
||||
},
|
||||
},
|
||||
}
|
46
bundles/miniflux/metadata.py
Normal file
46
bundles/miniflux/metadata.py
Normal file
|
@ -0,0 +1,46 @@
|
|||
defaults = {
|
||||
'apt': {
|
||||
'packages': {
|
||||
'miniflux': {},
|
||||
},
|
||||
'repos': {
|
||||
'miniflux': {
|
||||
'items': {
|
||||
'deb https://apt.miniflux.app/ /',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'postgresql': {
|
||||
'users': {
|
||||
'miniflux': {
|
||||
'password': repo.vault.password_for('{} postgresql miniflux'.format(node.name)),
|
||||
},
|
||||
},
|
||||
'databases': {
|
||||
'miniflux': {
|
||||
'owner': 'miniflux',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
def nginx(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
return {
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
metadata.get('miniflux/domain'): {
|
||||
'proxy': {
|
||||
'/': {
|
||||
'target': 'http://127.0.0.1:22040',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue