miniflux: add docker compose config
parent
86f741c3e9
commit
b1d70248f1
|
@ -4,3 +4,6 @@ elements_uuid: '5D19-E5D1'
|
||||||
monica_app_key: "{{ vault_monica_app_key }}"
|
monica_app_key: "{{ vault_monica_app_key }}"
|
||||||
monica_hash_salt: "{{ vault_monica_hash_salt }}"
|
monica_hash_salt: "{{ vault_monica_hash_salt }}"
|
||||||
monica_mariadb_root_pass: "{{ vault_monica_mariadb_root_pass }}"
|
monica_mariadb_root_pass: "{{ vault_monica_mariadb_root_pass }}"
|
||||||
|
|
||||||
|
miniflux_admin: "{{ vault_miniflux_admin }}"
|
||||||
|
miniflux_admin_pass: "{{ vault_miniflux_admin_pass }}"
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
66333462323334613232666338303230343263613330363538653765656466353032313330663435
|
34653966333139353132363561373666373561306561343965353162393333363465633362336336
|
||||||
3561393631386465316261353633663234383133343439380a393063326132656630623961656365
|
3161613435666463653536373363393939663431316233390a666337656238653732623839383161
|
||||||
63353866313961333233333837666438373764373534616161333565323831316665393230633364
|
66653934663538336235623663356333316432616361643930356531353734376531626135653565
|
||||||
3134353339636637340a633561316162656237386261373432373337373739623239643131633636
|
3334626639396631320a613039303962373863393234336435353937383430343461383139353838
|
||||||
34346162633336336162613639303435623936356563333664323237626466393865623536353437
|
63343662626630616133396333633066386537316562373035363165643033643433323737323136
|
||||||
63666661366532666637643433336233323138633130353331626364643334616636636131373735
|
31316239653863363438343733373630396333633432666436343130636235363734626232363136
|
||||||
31393533313436343732633761656261306434363165323161383034333166353737623138343364
|
63383133616562343162653335396564623065323936646235626430363539336630373665373133
|
||||||
66346562653266393665336339343466333635396532613937396539306335396566313466303662
|
64613038393563333462323833393664363839613435666166626666366366383732613562666635
|
||||||
62356262653835653335303566393035366431636439323664356433303633666563333136623861
|
37626436306663333762636331303737383935643934626533366438393632386335383438313837
|
||||||
39396464393631613865326437336231353136653366383937306138633432373062626666623561
|
34616330396333646531316334636236393164303136613665666665326166376434616662636463
|
||||||
64343831376264616661393030366163663666383035663633346232663233346537353337356436
|
30343433663764383734396338346330343632376461366665386662383962323661613138663833
|
||||||
62333738316633613030376664373136353031653033356334383963373461626133386139376165
|
38316137353036373266343932613261353432653339626361616265313538323139646436633235
|
||||||
3938
|
64613964323662383737643662633763616566386266646365633764376430633263356531343830
|
||||||
|
35373436643732313338336462306532326366643734666332313431396363363630313738383039
|
||||||
|
33626363333865346666643735623638366539653663363365383733386462386661323438613561
|
||||||
|
36343236643231346263306334333161623165386666363934633338653161643165306139346632
|
||||||
|
31363231393832663661303465643065363039363866383237303662383338363262373735663761
|
||||||
|
3332363437313435323466313932313738386164663966613330
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
nws.roosens.me {
|
nws.roosens.me {
|
||||||
reverse_proxy {{ groups['miniflux'][0] }}:8080
|
reverse_proxy {{ hostvars[groups['miniflux'][0]].static_ip }}:8002
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
cd /etc/miniflux
|
||||||
|
|
||||||
|
/usr/bin/docker compose exec -T db pg_dump -U miniflux miniflux |
|
||||||
|
/usr/bin/gzip --rsyncable |
|
||||||
|
/usr/local/bin/restic backup --stdin --stdin-filename miniflux-postgres.sql.gz
|
|
@ -0,0 +1,43 @@
|
||||||
|
---
|
||||||
|
- name: Ensure data directory is present
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: '/mnt/data1/miniflux'
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
owner: 'root'
|
||||||
|
group: 'root'
|
||||||
|
|
||||||
|
- name: Ensure data subvolumes are present
|
||||||
|
community.general.btrfs_subvolume:
|
||||||
|
name: '/miniflux/{{ item }}'
|
||||||
|
with_items:
|
||||||
|
- 'postgres'
|
||||||
|
|
||||||
|
- name: Ensure configuration directory is present
|
||||||
|
file:
|
||||||
|
path: '/etc/miniflux'
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Ensure compose file is present
|
||||||
|
template:
|
||||||
|
src: 'compose.yml.j2'
|
||||||
|
dest: '/etc/miniflux/compose.yml'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
group: 'root'
|
||||||
|
register: res
|
||||||
|
|
||||||
|
- name: Ensure stack is deployed
|
||||||
|
ansible.builtin.shell:
|
||||||
|
chdir: '/etc/miniflux'
|
||||||
|
cmd: 'docker compose up -d --remove-orphans'
|
||||||
|
when: 'res.changed'
|
||||||
|
|
||||||
|
- name: Ensure backup script is present
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: 'miniflux.backup.sh'
|
||||||
|
dest: '/etc/backups/miniflux.backup.sh'
|
||||||
|
owner: 'root'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
|
@ -0,0 +1,46 @@
|
||||||
|
# vim: ft=yaml
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: 'miniflux/miniflux:2.0.51'
|
||||||
|
restart: 'always'
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=postgres://miniflux:miniflux@db/miniflux?sslmode=disable
|
||||||
|
- RUN_MIGRATIONS=1
|
||||||
|
- CREATE_ADMIN=1
|
||||||
|
- ADMIN_USERNAME={{ miniflux_admin }}
|
||||||
|
- ADMIN_PASSWORD={{ miniflux_admin_pass }}
|
||||||
|
|
||||||
|
# Don't stress the system too much
|
||||||
|
- WORKER_POOL_SIZE=1
|
||||||
|
- BASE_URL=https://nws.roosens.me
|
||||||
|
|
||||||
|
# Default scheduling settings should be good
|
||||||
|
|
||||||
|
# I'm a hoarder
|
||||||
|
- CLEANUP_ARCHIVE_UNREAD_DAYS=-1
|
||||||
|
- CLEANUP_ARCHIVE_READ_DAYS=-1
|
||||||
|
ports:
|
||||||
|
- "8002:8080"
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: 'postgres:16.1-alpine'
|
||||||
|
restart: 'always'
|
||||||
|
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "pg_isready", "-U", "miniflux"]
|
||||||
|
interval: 10s
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=miniflux
|
||||||
|
- POSTGRES_PASSWORD=miniflux
|
||||||
|
- POSTGRES_DB=miniflux
|
||||||
|
volumes:
|
||||||
|
- /mnt/data1/miniflux/postgres:/var/lib/postgresql/data
|
Loading…
Reference in New Issue