mirror of
https://github.com/davestephens/ansible-nas
synced 2024-11-15 16:28:03 +00:00
44 lines
No EOL
1.4 KiB
YAML
44 lines
No EOL
1.4 KiB
YAML
- 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:
|
|
POSTGRES_USER: "miniflux"
|
|
POSTGRES_PASSWORD: "supersecure"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|
|
|
|
- name: Create Miniflux container
|
|
docker_container:
|
|
name: miniflux
|
|
image: miniflux/miniflux:latest
|
|
pull: true
|
|
links:
|
|
- miniflux-postgres:db
|
|
ports:
|
|
- "{{ miniflux_port }}:8080"
|
|
env:
|
|
DATABASE_URL: "postgres://miniflux:supersecure@db/miniflux?sslmode=disable"
|
|
RUN_MIGRATIONS: "1"
|
|
CREATE_ADMIN: "1"
|
|
ADMIN_USERNAME: "{{ miniflux_admin_username }}"
|
|
ADMIN_PASSWORD: "{{ miniflux_admin_password }}"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|
|
labels:
|
|
traefik.enable: "{{ miniflux_available_externally }}"
|
|
traefik.http.routers.miniflux.rule: "Host(`miniflux.{{ ansible_nas_domain }}`)"
|
|
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 }}"
|
|
traefik.http.services.miniflux.loadbalancer.server.port: "8080" |