2021-02-06 08:06:55 +00:00
|
|
|
---
|
2018-12-31 00:08:25 +00:00
|
|
|
- name: Create Miniflux Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ miniflux_data_directory }}/postgres"
|
|
|
|
|
|
|
|
- name: Create Postgres for Miniflux
|
|
|
|
docker_container:
|
|
|
|
name: miniflux-postgres
|
|
|
|
image: postgres:11.1
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ miniflux_data_directory }}/postgres:/var/lib/postgresql/data:rw"
|
|
|
|
env:
|
2019-07-03 22:00:56 +00:00
|
|
|
POSTGRES_USER: "miniflux"
|
|
|
|
POSTGRES_PASSWORD: "supersecure"
|
2018-12-31 00:08:25 +00:00
|
|
|
restart_policy: unless-stopped
|
2021-02-23 15:16:29 +00:00
|
|
|
memory: "{{ miniflux_postgres_memory }}"
|
2018-12-31 00:08:25 +00:00
|
|
|
|
2021-02-06 08:06:55 +00:00
|
|
|
- name: Create Miniflux Docker Container
|
2018-12-31 00:08:25 +00:00
|
|
|
docker_container:
|
|
|
|
name: miniflux
|
|
|
|
image: miniflux/miniflux:latest
|
|
|
|
pull: true
|
|
|
|
links:
|
2021-02-21 19:50:07 +00:00
|
|
|
- miniflux-postgres:db
|
2018-12-31 00:08:25 +00:00
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ miniflux_port }}:8080"
|
2018-12-31 00:08:25 +00:00
|
|
|
env:
|
2019-07-03 22:00:56 +00:00
|
|
|
DATABASE_URL: "postgres://miniflux:supersecure@db/miniflux?sslmode=disable"
|
|
|
|
RUN_MIGRATIONS: "1"
|
|
|
|
CREATE_ADMIN: "1"
|
2018-12-31 00:08:25 +00:00
|
|
|
ADMIN_USERNAME: "{{ miniflux_admin_username }}"
|
|
|
|
ADMIN_PASSWORD: "{{ miniflux_admin_password }}"
|
|
|
|
restart_policy: unless-stopped
|
2021-02-06 08:06:55 +00:00
|
|
|
memory: "{{ miniflux_memory }}"
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ miniflux_available_externally }}"
|
2021-02-06 08:06:55 +00:00
|
|
|
traefik.http.routers.miniflux.rule: "Host(`{{ miniflux_hostname }}.{{ ansible_nas_domain }}`)"
|
2021-01-19 23:51:59 +00:00
|
|
|
traefik.http.routers.miniflux.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.miniflux.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.miniflux.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
2021-02-06 08:06:55 +00:00
|
|
|
traefik.http.services.miniflux.loadbalancer.server.port: "8080"
|