2019-10-02 13:48:03 +00:00
|
|
|
#jinja2:lstrip_blocks: True
|
|
|
|
{{ ansible_managed | comment }}
|
2020-06-23 09:10:54 +00:00
|
|
|
version: "2.4"
|
2019-10-02 13:48:03 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
freshrss:
|
|
|
|
container_name: {{ freshrss_container_name }}
|
|
|
|
image: {{ freshrss_image }}
|
2020-06-17 20:32:10 +00:00
|
|
|
restart: {{ freshrss_restart_policy }}
|
|
|
|
{% if freshrss_exposed_ports | default([]) %}
|
2019-10-02 13:48:03 +00:00
|
|
|
ports:
|
2020-06-17 20:32:10 +00:00
|
|
|
{% for port in freshrss_exposed_ports %}
|
|
|
|
- {{ port | quote }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_volumes | default([]) %}
|
2019-10-02 13:48:03 +00:00
|
|
|
volumes:
|
2020-06-17 20:32:10 +00:00
|
|
|
{% for volume in freshrss_volumes %}
|
|
|
|
- "{{ volume.name }}:{{ volume.dest }}"
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_networks_applied | default([]) %}
|
|
|
|
networks:
|
|
|
|
{% for network in freshrss_networks_applied %}
|
|
|
|
- {{ network }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2019-10-02 13:48:03 +00:00
|
|
|
{% if freshrss_extra_hosts | default([]) %}
|
|
|
|
extra_hosts:
|
2020-06-17 20:32:10 +00:00
|
|
|
{% for host in freshrss_extra_hosts %}
|
|
|
|
- {{ host | quote }}
|
|
|
|
{% endfor %}
|
2019-10-02 13:48:03 +00:00
|
|
|
{% endif %}
|
|
|
|
environment:
|
2019-10-02 22:21:48 +00:00
|
|
|
- FRESHRSS_ENVIRONMENT=production
|
2019-10-02 13:48:03 +00:00
|
|
|
{% if freshrss_salt is defined and freshrss_salt %}
|
|
|
|
- FRESHRSS_SALT={{ freshrss_salt }}
|
|
|
|
{% endif %}
|
2019-10-02 22:11:09 +00:00
|
|
|
- FRESHRSS_BASE_URL={{ freshrss_base_url }}
|
2019-10-02 13:48:03 +00:00
|
|
|
- FRESHRSS_LANGUAGE={{ freshrss_language }}
|
|
|
|
- FRESHRSS_TITLE={{ freshrss_title }}
|
|
|
|
{% if freshrss_meta_description is defined and freshrss_meta_description %}
|
|
|
|
- FRESHRSS_META_DESCRIPTION={{ freshrss_meta_description }}
|
|
|
|
{% endif %}
|
|
|
|
- FRESHRSS_DEFAULT_USER={{ freshrss_default_user }}
|
|
|
|
- FRESHRSS_DEFAULT_PASSWORD={{ freshrss_default_password }}
|
2020-06-18 20:16:16 +00:00
|
|
|
- FRESHRSS_ALLOW_ANONYMOUS={{ freshrss_allow_anonymous | bool | lower }}
|
|
|
|
- FRESHRSS_ALLOW_ANONYMOUS_REFRESH={{ freshrss_allow_anonymous_refresh | bool | lower }}
|
2019-10-02 13:48:03 +00:00
|
|
|
- FRESHRSS_AUTH_TYPE={{ freshrss_auth_type }}
|
2020-06-18 20:16:16 +00:00
|
|
|
- FRESHRSS_API_ENABLED={{ freshrss_api_enabled | bool | lower }}
|
|
|
|
- FRESHRSS_UNSAFE_AUTOLOGIN_ENABLED={{ freshrss_unsafe_autologin_enabled | bool | lower }}
|
|
|
|
- FRESHRSS_SIMPLEPIE_SYSLOG_ENABLED={{ freshrss_simplepie_syslog_enabled | bool | lower }}
|
|
|
|
- FRESHRSS_PUBSUBHUBBUB_ENABLED={{ freshrss_pubsubhubbub_enabled | bool | lower }}
|
|
|
|
- FRESHRSS_ALLOW_ROBOTS={{ freshrss_allow_robots | bool | lower }}
|
|
|
|
- FRESHRSS_ALLOW_REFERRER={{ freshrss_allow_referrer | bool | lower }}
|
2019-10-02 13:48:03 +00:00
|
|
|
- FRESHRSS_LIMITS_COOKIE_DURATION={{ freshrss_limits_cookie_duration }}
|
|
|
|
- FRESHRSS_LIMITS_CACHE_DURATION={{ freshrss_limits_cache_duration }}
|
|
|
|
- FRESHRSS_LIMITS_TIMEOUT={{ freshrss_limits_timeout }}
|
|
|
|
- FRESHRSS_LIMITS_MAX_INACTIVITY={{ freshrss_limits_max_inactivity }}
|
|
|
|
- FRESHRSS_LIMITS_MAX_FEEDS={{ freshrss_limits_max_feeds }}
|
|
|
|
- FRESHRSS_LIMITS_MAX_CATEGORIES={{ freshrss_limits_max_categories }}
|
|
|
|
- FRESHRSS_LIMITS_MAX_REGISTRATIONS={{ freshrss_limits_max_registrations }}
|
|
|
|
{% if freshrss_curlopt_ssl_verifyhost is defined and freshrss_curlopt_ssl_verifyhost %}
|
|
|
|
- FRESHRSS_CURLOPT_SSL_VERIFYHOST={{ freshrss_curlopt_ssl_verifyhost }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_curlopt_ssl_verifypeer is defined and freshrss_curlopt_ssl_verifypeer %}
|
|
|
|
- FRESHRSS_CURLOPT_SSL_VERIFYPEER={{ freshrss_curlopt_ssl_verifypeer }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_curlopt_proxytype is defined and freshrss_curlopt_proxytype %}
|
|
|
|
- FRESHRSS_CURLOPT_PROXYTYPE={{ freshrss_curlopt_proxytype }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_curlopt_proxy is defined and freshrss_curlopt_proxy %}
|
|
|
|
- FRESHRSS_CURLOPT_PROXY={{ freshrss_curlopt_proxy }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_curlopt_proxyport is defined and freshrss_curlopt_proxyport %}
|
|
|
|
- FRESHRSS_CURLOPT_PROXYPORT={{ freshrss_curlopt_proxyport }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_curlopt_proxyauth is defined and freshrss_curlopt_proxyauth %}
|
|
|
|
- FRESHRSS_CURLOPT_PROXYAUTH={{ freshrss_curlopt_proxyauth }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_curlopt_proxyuserpwd is defined and freshrss_curlopt_proxyuserpwd %}
|
|
|
|
- FRESHRSS_CURLOPT_PROXYUSERPWD={{ freshrss_curlopt_proxyuserpwd }}
|
|
|
|
{% endif %}
|
2020-06-17 20:32:10 +00:00
|
|
|
- FRESHRSS_DB_TYPE={{ freshrss_db_type }}
|
|
|
|
{% if freshrss_db_type != "sqlite" %}
|
2019-11-24 22:31:47 +00:00
|
|
|
{% if freshrss_db_type == "pgsql" %}
|
2019-10-27 22:23:44 +00:00
|
|
|
- FRESHRSS_DB_HOST={{ freshrss_db_server }};sslmode={{ freshrss_db_ssl_mode }}
|
2020-06-17 20:32:10 +00:00
|
|
|
- FRESHRSS_POSTGRES_SSL_ROOTCERT={{ freshrss_db_ssl_rootcert }}
|
2019-10-27 22:23:44 +00:00
|
|
|
{% else %}
|
|
|
|
- FRESHRSS_DB_HOST={{ freshrss_db_server }}
|
|
|
|
{% endif %}
|
2019-10-26 19:40:53 +00:00
|
|
|
- FRESHRSS_DB_PORT={{ freshrss_db_port }}
|
|
|
|
- FRESHRSS_DB_USER={{ freshrss_db_user }}
|
|
|
|
- FRESHRSS_DB_PASSWORD={{ freshrss_db_password }}
|
|
|
|
- FRESHRSS_DB_BASE={{ freshrss_db_name }}
|
2019-10-02 22:21:48 +00:00
|
|
|
- FRESHRSS_DB_PREFIX=freshrss_
|
2020-06-17 20:32:10 +00:00
|
|
|
{% endif %}
|
2019-10-02 13:48:03 +00:00
|
|
|
- FRESHRSS_EXTENSIONS_ENABLED={{ freshrss_extensions_enabled | join(',') }}
|
2022-11-25 13:35:31 +00:00
|
|
|
- FRESHRSS_TRUSTED_SOURCES={{ freshrss_trusted_sources | join(',') }}
|
2019-10-02 13:48:03 +00:00
|
|
|
{% if freshrss_memory_limit is defined %}
|
|
|
|
mem_limit: {{ freshrss_memory_limit }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_memory_reservation is defined %}
|
|
|
|
mem_reservation: {{ freshrss_memory_reservation }}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_cpu_shares is defined %}
|
|
|
|
cpu_shares: {{ freshrss_cpu_shares }}
|
|
|
|
{% endif %}
|
|
|
|
{% if not freshrss_cap_add | length == 0 %}
|
|
|
|
cap_add:
|
|
|
|
{% for item in freshrss_cap_add %}
|
|
|
|
- {{ item }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if not freshrss_cap_drop | length == 0 %}
|
|
|
|
cap_drop:
|
|
|
|
{% for item in freshrss_cap_drop %}
|
|
|
|
- {{ item }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if not freshrss_security_opt | length == 0 %}
|
|
|
|
security_opt:
|
|
|
|
{% for item in freshrss_security_opt %}
|
|
|
|
- {{ item }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2022-11-25 13:35:31 +00:00
|
|
|
{% if freshrss_healthcheck is defined %}
|
2019-10-02 13:48:03 +00:00
|
|
|
healthcheck:
|
|
|
|
{% for key, value in freshrss_healthcheck.items() %}
|
|
|
|
{{ key }}: {{ value }}
|
|
|
|
{% endfor %}
|
2022-11-25 13:35:31 +00:00
|
|
|
{% endif %}
|
2019-10-02 13:48:03 +00:00
|
|
|
{% if freshrss_pids_limit is defined %}
|
|
|
|
pids_limit: {{ freshrss_pids_limit }}
|
|
|
|
{% endif %}
|
2020-06-17 20:32:10 +00:00
|
|
|
{% if freshrss_volumes | default([]) | rejectattr("bind") | list | length > 0 %}
|
2019-10-02 13:48:03 +00:00
|
|
|
|
|
|
|
volumes:
|
2020-06-17 20:32:10 +00:00
|
|
|
{% for volume in freshrss_volumes | rejectattr("bind") %}
|
|
|
|
{{ volume.name }}:
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if freshrss_networks | default([]) | length > 0 %}
|
|
|
|
|
|
|
|
networks:
|
|
|
|
{% for network in freshrss_networks %}
|
|
|
|
{{ network.name }}:
|
|
|
|
driver: {{ network.backend | default("bridge") }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|