Add tinytinyrss to ansible

This commit is contained in:
Tobias Reisinger 2023-12-11 01:42:57 +01:00
parent 0c6ef34cf6
commit 2b8aef7f9f
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
14 changed files with 95 additions and 78 deletions

2
.gitignore vendored
View file

@ -15,6 +15,7 @@
/jellyfin/
/tandoor/
/telegraf/
/tinytinyrss/
/umami/
/uptime-kuma/
/watchtower/
@ -29,6 +30,7 @@
/caddy/config/conf.002.d/inventory.serguzim.me.conf
/caddy/config/conf.002.d/media.serguzim.me.conf
/caddy/config/conf.002.d/recipes.serguzim.me.conf
/caddy/config/conf.002.d/rss.serguzim.me.conf
/caddy/config/conf.002.d/status.serguzim.me.conf
/caddy/config/conf.002.d/tick.serguzim.me.conf
/caddy/config/conf.002.d/webdis.huck.serguzim.me.conf

View file

@ -15,6 +15,11 @@ compose_file_main:
apps:
external: true
compose_file_depends_on:
services:
app:
depends_on: "{{ compose.depends_on }}"
compose_file_env:
services:
app:

View file

@ -18,6 +18,7 @@
- jellyfin
- tandoor
- telegraf
- tinytinyrss
- umami
- uptime-kuma
- watchtower

View file

@ -13,6 +13,7 @@
- jellyfin
- tandoor
- telegraf
- tinytinyrss
- umami
- uptime-kuma
- watchtower

View file

@ -17,7 +17,7 @@ http {
index index.php;
upstream app {
server tt-rss-app:9000;
server tt-rss:9000;
}
server {

View file

@ -0,0 +1,16 @@
---
- name: Deploy {{ svc.name }}
tags:
- tinytinyrss
- tt-rss
- news
block:
- import_tasks: prepare-common-service.yml
- name: Copy the nginx-config
ansible.builtin.copy:
src: nginx.conf
dest: "{{ (service_path, 'nginx.conf') | path_join }}"
mode: '0644'
- import_tasks: start-common-service.yml

View file

@ -0,0 +1,56 @@
svc:
domain: "rss.serguzim.me"
name: tinytinyrss
port: 80
db:
host: "{{ postgres.host }}"
port: "{{ postgres.port }}"
database: tinytinyrss
user: "{{ vault_tinytinyrss.db.user }}"
pass: "{{ vault_tinytinyrss.db.pass }}"
svc_env:
TTRSS_DB_TYPE: pgsql
TTRSS_DB_HOST: "{{ svc.db.host }}"
TTRSS_DB_NAME: "{{ svc.db.database }}"
TTRSS_DB_USER: "{{ svc.db.user }}"
TTRSS_DB_PASS: "{{ svc.db.pass }}"
TTRSS_SELF_URL_PATH: https://{{ svc.domain }}/tt-rss/
compose:
watchtower: false
image: cthulhoo/ttrss-web-nginx
depends_on:
- tt-rss
env: true
volumes:
- app:/var/www/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf
file:
services:
tt-rss:
image: cthulhoo/ttrss-fpm-pgsql-static
restart: always
env_file:
- service.env
volumes:
- app:/var/www/html
networks:
local-net:
updater:
image: cthulhoo/ttrss-fpm-pgsql-static
restart: always
env_file:
- service.env
volumes:
- app:/var/www/html
depends_on:
- tt-rss
command: /opt/tt-rss/updater.sh
networks:
local-net:
volumes:
app:

View file

@ -1,7 +1,2 @@
- import_tasks: steps/create-service-directory.yml
- import_tasks: steps/template-docker-compose.yml
- import_tasks: steps/template-service-env.yml
when: compose.env|default(False) == True
- include_tasks: steps/template-site-config.yml
when: svc.domain is defined
- import_tasks: steps/start-service.yml
- import_tasks: prepare-common-service.yml
- import_tasks: start-common-service.yml

View file

@ -0,0 +1,4 @@
- import_tasks: steps/create-service-directory.yml
- import_tasks: steps/template-docker-compose.yml
- import_tasks: steps/template-service-env.yml
when: compose.env|default(False) == True

View file

@ -0,0 +1,3 @@
- include_tasks: steps/template-site-config.yml
when: svc.domain is defined
- import_tasks: steps/start-service.yml

View file

@ -1,6 +1,10 @@
{%- set compose_file = compose.file | default({}) -%}
{%- set compose_file = compose_file_main | combine(compose_file, recursive=True) -%}
{%- if compose.depends_on | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_depends_on, recursive=True) -%}
{%- endif -%}
{%- if compose.env | default(False) -%}
{%- set compose_file = compose_file | combine(compose_file_env, recursive=True) -%}
{%- endif -%}

View file

@ -1,4 +0,0 @@
rss.serguzim.me {
import default
reverse_proxy tt-rss:80
}

View file

@ -1,15 +0,0 @@
TTRSS_DB_USER=tinytinyrss
TTRSS_DB_NAME=tinytinyrss
TTRSS_DB_PASS=
TTRSS_DB_TYPE=pgsql
TTRSS_DB_HOST=db.serguzim.me
TTRSS_SELF_URL_PATH=https://rss.serguzim.me/tt-rss/
# You can customize other config.php defines by setting overrides here.
# See app/Dockerfile for complete list. Examples:
# TTRSS_PLUGINS=auth_remote
# TTRSS_SINGLE_USER_MODE=true
# TTRSS_SESSION_COOKIE_LIFETIME=2592000
# TTRSS_FORCE_ARTICLE_PURGE=30
# etc, etc.

View file

@ -1,51 +0,0 @@
version: '3'
services:
app:
image: cthulhoo/ttrss-fpm-pgsql-static
restart: always
env_file:
- .env
- .secret.env
volumes:
- app:/var/www/html
networks:
local-net:
aliases:
- tt-rss-app
updater:
image: cthulhoo/ttrss-fpm-pgsql-static
restart: always
env_file:
- .env
- .secret.env
volumes:
- app:/var/www/html
depends_on:
- app
command: /opt/tt-rss/updater.sh
networks:
local-net:
web-nginx:
image: cthulhoo/ttrss-web-nginx
restart: always
volumes:
- app:/var/www/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- app
networks:
local-net:
apps:
aliases:
- tt-rss
volumes:
app:
networks:
local-net:
apps:
external: true