[mailman3] Create gunicorn configuration file
To make changing the gunicorn configuration more easily let's move configuration values from systemd service to separate configuration file. The file will live in /etc/mailman3/gunicorn.conf.py.
This commit is contained in:
parent
f256adda6e
commit
a807fb3d4f
13 changed files with 132 additions and 113 deletions
|
@ -9,12 +9,12 @@ ipa_host_group: mailman
|
||||||
ipa_host_group_desc: Mailing list services
|
ipa_host_group_desc: Mailing list services
|
||||||
lvm_size: 950000
|
lvm_size: 950000
|
||||||
# Used by the mailman role
|
# Used by the mailman role
|
||||||
mailman_db_server: db01.iad2.fedoraproject.org
|
mailman3_db_server: db01.iad2.fedoraproject.org
|
||||||
mailman_domains:
|
mailman3_domains:
|
||||||
- lists.fedoraproject.org
|
- lists.fedoraproject.org
|
||||||
- lists.fedorahosted.org
|
- lists.fedorahosted.org
|
||||||
- lists.pagure.io
|
- lists.pagure.io
|
||||||
mailman_login:
|
mailman3_login:
|
||||||
facebook:
|
facebook:
|
||||||
display_name: Facebook
|
display_name: Facebook
|
||||||
provider: facebook
|
provider: facebook
|
||||||
|
@ -57,11 +57,11 @@ primary_auth_source: ipa
|
||||||
tcp_ports: [25, 80, 443]
|
tcp_ports: [25, 80, 443]
|
||||||
|
|
||||||
# mailman role variables
|
# mailman role variables
|
||||||
mailman_rest_api_username: "{{ mailman_rest_api_user }}"
|
mailman3_rest_api_username: "{{ mailman_rest_api_user }}"
|
||||||
mailman_rest_api_password: "{{ mailman_rest_api_pass }}"
|
mailman3_rest_api_password: "{{ mailman_rest_api_pass }}"
|
||||||
mailman_mailman_db_pass: "{{ mailman_mm_db_pass }}"
|
mailman3_mailman_db_pass: "{{ mailman_mm_db_pass }}"
|
||||||
mailman_hyperkitty_admin_db_pass: "{{ mailman_hk_admin_db_pass }}"
|
mailman3_hyperkitty_admin_db_pass: "{{ mailman_hk_admin_db_pass }}"
|
||||||
mailman_hyperkitty_db_pass: "{{ mailman_hk_db_pass }}"
|
mailman3_hyperkitty_db_pass: "{{ mailman_hk_db_pass }}"
|
||||||
mailman_hyperkitty_cookie_key: "{{ mailman_hk_cookie_key }}"
|
mailman3_hyperkitty_cookie_key: "{{ mailman_hk_cookie_key }}"
|
||||||
mailman_hyperkitty_archiver_key: "{{ mailman_hk_archiver_key }}"
|
mailman3_hyperkitty_archiver_key: "{{ mailman_hk_archiver_key }}"
|
||||||
mailman_smtp_port: 587
|
mailman3_smtp_port: 587
|
||||||
|
|
|
@ -9,12 +9,12 @@ ipa_host_group: mailman
|
||||||
ipa_host_group_desc: Mailing list services
|
ipa_host_group_desc: Mailing list services
|
||||||
lvm_size: 350000
|
lvm_size: 350000
|
||||||
# Used by the mailman role
|
# Used by the mailman role
|
||||||
mailman_db_server: db01.stg.iad2.fedoraproject.org
|
mailman3_db_server: db01.stg.iad2.fedoraproject.org
|
||||||
mailman_domains:
|
mailman3_domains:
|
||||||
- lists.stg.fedoraproject.org
|
- lists.stg.fedoraproject.org
|
||||||
- lists.stg.fedorahosted.org
|
- lists.stg.fedorahosted.org
|
||||||
- lists.stg.pagure.io
|
- lists.stg.pagure.io
|
||||||
mailman_login:
|
mailman3_login:
|
||||||
facebook:
|
facebook:
|
||||||
display_name: Facebook
|
display_name: Facebook
|
||||||
provider: facebook
|
provider: facebook
|
||||||
|
@ -50,18 +50,18 @@ postfix_group: mailman-stg
|
||||||
tcp_ports: [25, 80, 443]
|
tcp_ports: [25, 80, 443]
|
||||||
|
|
||||||
# mailman role variables
|
# mailman role variables
|
||||||
mailman_log_level: debug
|
mailman3_log_level: debug
|
||||||
mailman_rest_api_username: "{{ mailman_stg_rest_api_user }}"
|
mailman3_rest_api_username: "{{ mailman_stg_rest_api_user }}"
|
||||||
mailman_rest_api_password: "{{ mailman_stg_rest_api_pass }}"
|
mailman3_rest_api_password: "{{ mailman_stg_rest_api_pass }}"
|
||||||
mailman_mailman_db_pass: "{{ mailman_mm_db_pass }}"
|
mailman3_mailman_db_pass: "{{ mailman_mm_db_pass }}"
|
||||||
mailman_hyperkitty_admin_db_pass: "{{ mailman_hk_admin_db_pass }}"
|
mailman3_hyperkitty_admin_db_pass: "{{ mailman_hk_admin_db_pass }}"
|
||||||
mailman_hyperkitty_db_pass: "{{ mailman_hk_db_pass }}"
|
mailman3_hyperkitty_db_pass: "{{ mailman_hk_db_pass }}"
|
||||||
mailman_hyperkitty_cookie_key: "{{ mailman_hk_cookie_key }}"
|
mailman3_hyperkitty_cookie_key: "{{ mailman_hk_cookie_key }}"
|
||||||
mailman_hyperkitty_archiver_key: "{{ mailman_hk_stg_archiver_key }}"
|
mailman3_hyperkitty_archiver_key: "{{ mailman_hk_stg_archiver_key }}"
|
||||||
mailman_openidc_server_url: "https://id.stg.fedoraproject.org/"
|
mailman3_openidc_server_url: "https://id.stg.fedoraproject.org/"
|
||||||
mailman_httpd_hostname: lists.stg.fedoraproject.org
|
mailman3_httpd_hostname: lists.stg.fedoraproject.org
|
||||||
|
|
||||||
# Setting debug variables to 'true' disables mail sending
|
# Setting debug variables to 'true' disables mail sending
|
||||||
# If you want to enable it just set it to 'false'
|
# If you want to enable it just set it to 'false'
|
||||||
mailman_debug: true
|
mailman3_debug: true
|
||||||
mailman_hyperkitty_debug: true
|
mailman3_hyperkitty_debug: true
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
# Mailman core settings
|
# Mailman core settings
|
||||||
mailman_webui_basedir: /srv/webui
|
mailman3_webui_basedir: /srv/webui
|
||||||
mailman_webui_confdir: /etc/mailman3
|
mailman3_webui_confdir: /etc/mailman3
|
||||||
mailman_rest_api_username: restadmin
|
mailman3_rest_api_username: restadmin
|
||||||
mailman_rest_api_password: changeme
|
mailman3_rest_api_password: changeme
|
||||||
mailman_rest_api_workers: 2
|
mailman3_rest_api_workers: 2
|
||||||
mailman_log_directory: /var/log/mailman3
|
mailman3_log_directory: /var/log/mailman3
|
||||||
mailman_log_level: info
|
mailman3_log_level: info
|
||||||
mailman_log_items:
|
mailman3_log_items:
|
||||||
- archiver
|
- archiver
|
||||||
- bounce
|
- bounce
|
||||||
- config
|
- config
|
||||||
|
@ -17,26 +17,25 @@ mailman_log_items:
|
||||||
- subscribe
|
- subscribe
|
||||||
- task
|
- task
|
||||||
- gunicorn
|
- gunicorn
|
||||||
mailman_smtp_port: 25
|
mailman3_smtp_port: 25
|
||||||
mailman_debug: false
|
mailman3_debug: false
|
||||||
|
|
||||||
# Mailman DB settings (the values should be provided by playbook)
|
# Mailman DB settings (the values should be provided by playbook)
|
||||||
mailman_db_server: localhost
|
mailman3_db_server: localhost
|
||||||
mailman_mailman_db_pass: changeme
|
mailman3_mailman_db_pass: changeme
|
||||||
|
|
||||||
# Hyperkitty/Postorius settings (the values should be provided by playbook)
|
# Hyperkitty/Postorius settings (the values should be provided by playbook)
|
||||||
mailman_hyperkitty_debug: false
|
mailman3_hyperkitty_debug: false
|
||||||
mailman_hyperkitty_admin_db_pass: changeme
|
mailman3_hyperkitty_admin_db_pass: changeme
|
||||||
mailman_hyperkitty_db_pass: changeme
|
mailman3_hyperkitty_db_pass: changeme
|
||||||
mailman_hyperkitty_cookie_key: changeme
|
mailman3_hyperkitty_cookie_key: changeme
|
||||||
mailman_hyperkitty_archiver_key: changeme
|
mailman3_hyperkitty_archiver_key: changeme
|
||||||
mailman_gunicorn_workers: "{{num_cpus * 2 + 1}}"
|
mailman3_domains:
|
||||||
mailman_domains:
|
|
||||||
- lists.example.com
|
- lists.example.com
|
||||||
- lists.example.org
|
- lists.example.org
|
||||||
mailman_social_login: []
|
mailman3_login: []
|
||||||
|
|
||||||
# OpenID-connect settings
|
# OpenID-connect settings
|
||||||
# Attention that you should ensure that callback/redirect_url set at the provider side will end with /
|
# Attention that you should ensure that callback/redirect_url set at the provider side will end with /
|
||||||
# see https://docs.allauth.org/en/latest/socialaccount/providers/openid_connect.html#openid-connect
|
# see https://docs.allauth.org/en/latest/socialaccount/providers/openid_connect.html#openid-connect
|
||||||
mailman_openidc_server_url: https://id.fedoraproject.org/
|
mailman3_openidc_server_url: https://id.fedoraproject.org/
|
||||||
|
|
8
roles/mailman3/files/gunicorn.conf.py
Normal file
8
roles/mailman3/files/gunicorn.conf.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
"""Configuration file for mailman gunicorn instance."""
|
||||||
|
import multiprocessing
|
||||||
|
|
||||||
|
workers = multiprocessing.cpu_count() * 2 + 1
|
||||||
|
max_requests = 50000
|
||||||
|
timeout = 1000
|
||||||
|
threads = 2 * multiprocessing.cpu_count()
|
||||||
|
forwarded_allow_ips = "*"
|
|
@ -11,5 +11,5 @@ Type=simple
|
||||||
User=mailman
|
User=mailman
|
||||||
Group=mailman
|
Group=mailman
|
||||||
WorkingDirectory=/etc/mailman3
|
WorkingDirectory=/etc/mailman3
|
||||||
ExecStart=/usr/bin/gunicorn --max-requests 50000 --timeout 1000 --workers={{ mailman_gunicorn_workers }} --forwarded-allow-ips="*" mailman_web.wsgi
|
ExecStart=/usr/bin/gunicorn -c /etc/mailman3/gunicorn.conf.py mailman_web.wsgi
|
||||||
ExecStop=/bin/kill -s TERM $MAINPID
|
ExecStop=/bin/kill -s TERM $MAINPID
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
- name: Initialize authentication providers
|
- name: Initialize authentication providers
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: mailman-web loaddata "{{ mailman_webui_confdir }}/initial-data.json"
|
cmd: mailman-web loaddata "{{ mailman3_webui_confdir }}/initial-data.json"
|
||||||
chdir: /etc/mailman3
|
chdir: /etc/mailman3
|
||||||
become_user: mailman
|
become_user: mailman
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
#
|
#
|
||||||
- name: Ensuring log directory exists
|
- name: Ensuring log directory exists
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mailman_log_directory }}"
|
path: "{{ mailman3_log_directory }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: mailman
|
owner: mailman
|
||||||
group: mailman
|
group: mailman
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
- name: Install the hyperkitty/postorius settings file
|
- name: Install the hyperkitty/postorius settings file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
dest: "{{ mailman_webui_confdir }}/{{ item }}"
|
dest: "{{ mailman3_webui_confdir }}/{{ item }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
with_items:
|
with_items:
|
||||||
- settings.py
|
- settings.py
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
- name: Install the hyperkitty/postorius urls file
|
- name: Install the hyperkitty/postorius urls file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: urls.py
|
src: urls.py
|
||||||
dest: "{{ mailman_webui_confdir }}/urls.py"
|
dest: "{{ mailman3_webui_confdir }}/urls.py"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
@ -227,7 +227,7 @@
|
||||||
|
|
||||||
- name: Create the fulltext index dir
|
- name: Create the fulltext index dir
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mailman_webui_basedir }}/fulltext_index"
|
path: "{{ mailman3_webui_basedir }}/fulltext_index"
|
||||||
state: directory
|
state: directory
|
||||||
owner: mailman
|
owner: mailman
|
||||||
group: mailman
|
group: mailman
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
|
|
||||||
- name: Create the hyperkitty static files dirs
|
- name: Create the hyperkitty static files dirs
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mailman_webui_basedir }}/{{ item }}"
|
path: "{{ mailman3_webui_basedir }}/{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: mailman
|
owner: mailman
|
||||||
group: mailman
|
group: mailman
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
|
|
||||||
- name: Create the fedora-specific hyperkitty img dir
|
- name: Create the fedora-specific hyperkitty img dir
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mailman_webui_basedir }}/static-fedora/hyperkitty/img"
|
path: "{{ mailman3_webui_basedir }}/static-fedora/hyperkitty/img"
|
||||||
state: directory
|
state: directory
|
||||||
owner: mailman
|
owner: mailman
|
||||||
group: mailman
|
group: mailman
|
||||||
|
@ -265,7 +265,7 @@
|
||||||
|
|
||||||
- name: Create the hyperkitty templates override dirs
|
- name: Create the hyperkitty templates override dirs
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mailman_webui_basedir }}/templates/{{ item }}"
|
path: "{{ mailman3_webui_basedir }}/templates/{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: mailman
|
owner: mailman
|
||||||
group: mailman
|
group: mailman
|
||||||
|
@ -280,7 +280,7 @@
|
||||||
- name: Copy the initial user fixture
|
- name: Copy the initial user fixture
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: initial-data.json.j2
|
src: initial-data.json.j2
|
||||||
dest: "{{ mailman_webui_confdir }}/initial-data.json"
|
dest: "{{ mailman3_webui_confdir }}/initial-data.json"
|
||||||
owner: root
|
owner: root
|
||||||
group: mailman
|
group: mailman
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
- name: Replace the top.html template in hyperkitty/postorius to change banner
|
- name: Replace the top.html template in hyperkitty/postorius to change banner
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: top.html
|
src: top.html
|
||||||
dest: "{{ mailman_webui_basedir }}/templates/hyperkitty/top.html"
|
dest: "{{ mailman3_webui_basedir }}/templates/hyperkitty/top.html"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify:
|
notify:
|
||||||
- Restart mailmanweb
|
- Restart mailmanweb
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
- name: Install our fedora-specific logo
|
- name: Install our fedora-specific logo
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: logo-hyperkitty-fedora.png
|
src: logo-hyperkitty-fedora.png
|
||||||
dest: "{{ mailman_webui_basedir }}/static-fedora/logo-hyperkitty-fedora.png"
|
dest: "{{ mailman3_webui_basedir }}/static-fedora/logo-hyperkitty-fedora.png"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -317,7 +317,7 @@
|
||||||
- name: Install our fedora-specific favicon
|
- name: Install our fedora-specific favicon
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: favicon.ico
|
src: favicon.ico
|
||||||
dest: "{{ mailman_webui_basedir }}/static-fedora/favicon.ico"
|
dest: "{{ mailman3_webui_basedir }}/static-fedora/favicon.ico"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -326,7 +326,7 @@
|
||||||
- name: Install our fedora-specific robots.txt
|
- name: Install our fedora-specific robots.txt
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: robots.txt
|
src: robots.txt
|
||||||
dest: "{{ mailman_webui_basedir }}/static-fedora/robots.txt"
|
dest: "{{ mailman3_webui_basedir }}/static-fedora/robots.txt"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -335,7 +335,7 @@
|
||||||
- name: Install our fedora-specific brand template override
|
- name: Install our fedora-specific brand template override
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: navbar-brand.html
|
src: navbar-brand.html
|
||||||
dest: "{{ mailman_webui_basedir }}/templates/hyperkitty/navbar-brand.html"
|
dest: "{{ mailman3_webui_basedir }}/templates/hyperkitty/navbar-brand.html"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -344,7 +344,7 @@
|
||||||
- name: Install our fedora-specific page headers
|
- name: Install our fedora-specific page headers
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: headers.html
|
src: headers.html
|
||||||
dest: "{{ mailman_webui_basedir }}/templates/hyperkitty/headers.html"
|
dest: "{{ mailman3_webui_basedir }}/templates/hyperkitty/headers.html"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
- name: Install our fedora-specific login page extension
|
- name: Install our fedora-specific login page extension
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: login_extra_top.html
|
src: login_extra_top.html
|
||||||
dest: "{{ mailman_webui_basedir }}/templates/django_mailman3/login_extra_top.html"
|
dest: "{{ mailman3_webui_basedir }}/templates/django_mailman3/login_extra_top.html"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -361,7 +361,7 @@
|
||||||
|
|
||||||
- name: Create dirs for signup_closed page
|
- name: Create dirs for signup_closed page
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mailman_webui_basedir }}/templates/account"
|
path: "{{ mailman3_webui_basedir }}/templates/account"
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
@ -373,7 +373,7 @@
|
||||||
- name: Install our fedora-specific signup_closed page
|
- name: Install our fedora-specific signup_closed page
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: signup_closed.html
|
src: signup_closed.html
|
||||||
dest: "{{ mailman_webui_basedir }}/templates/account/signup_closed.html"
|
dest: "{{ mailman3_webui_basedir }}/templates/account/signup_closed.html"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -382,7 +382,7 @@
|
||||||
- name: Install our fedmenu js hook
|
- name: Install our fedmenu js hook
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: bottom.html
|
src: bottom.html
|
||||||
dest: "{{ mailman_webui_basedir }}/templates/hyperkitty/bottom.html"
|
dest: "{{ mailman3_webui_basedir }}/templates/hyperkitty/bottom.html"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- mailman
|
- mailman
|
||||||
|
@ -393,7 +393,7 @@
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: |
|
cmd: |
|
||||||
mailman-web migrate
|
mailman-web migrate
|
||||||
--pythonpath {{ mailman_webui_confdir }}
|
--pythonpath {{ mailman3_webui_confdir }}
|
||||||
--settings settings_admin
|
--settings settings_admin
|
||||||
--no-input
|
--no-input
|
||||||
chdir: /etc/mailman3
|
chdir: /etc/mailman3
|
||||||
|
@ -410,7 +410,7 @@
|
||||||
- name: Install the fedora-specific modules
|
- name: Install the fedora-specific modules
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: django_fedora_nosignup.py
|
src: django_fedora_nosignup.py
|
||||||
dest: "{{ mailman_webui_confdir }}/django_fedora_nosignup.py"
|
dest: "{{ mailman3_webui_confdir }}/django_fedora_nosignup.py"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
@ -501,9 +501,21 @@
|
||||||
- mailman
|
- mailman
|
||||||
- hyperkitty
|
- hyperkitty
|
||||||
|
|
||||||
|
- name: Copy the configuration for gunicorn
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: gunicorn.conf.py
|
||||||
|
dest: /etc/mailman3/gunicorn.conf.py
|
||||||
|
owner: mailman
|
||||||
|
group: mailman
|
||||||
|
mode: "0640"
|
||||||
|
notify: Restart mailmanweb
|
||||||
|
tags:
|
||||||
|
- mailman
|
||||||
|
- hyperkitty
|
||||||
|
|
||||||
- name: Systemd unit to start postorius/hyperkitty through gunicorn
|
- name: Systemd unit to start postorius/hyperkitty through gunicorn
|
||||||
ansible.builtin.template:
|
ansible.builtin.copy:
|
||||||
src: mailmanweb.service.j2
|
src: systemd/mailmanweb.service
|
||||||
dest: /etc/systemd/system/mailmanweb.service
|
dest: /etc/systemd/system/mailmanweb.service
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
register: mailmanweb_systemd
|
register: mailmanweb_systemd
|
||||||
|
@ -530,7 +542,7 @@
|
||||||
|
|
||||||
- name: Create the scripts dir
|
- name: Create the scripts dir
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ mailman_webui_basedir }}/bin"
|
path: "{{ mailman3_webui_basedir }}/bin"
|
||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
@ -542,7 +554,7 @@
|
||||||
- name: Install the scripts
|
- name: Install the scripts
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "{{ mailman_webui_basedir }}/bin/{{ item }}"
|
dest: "{{ mailman3_webui_basedir }}/bin/{{ item }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
@ -558,7 +570,7 @@
|
||||||
|
|
||||||
- name: Run the DMARC mitigation script
|
- name: Run the DMARC mitigation script
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "python {{ mailman_webui_basedir }}/bin/enable_dmarc_mitigation.py"
|
cmd: "python {{ mailman3_webui_basedir }}/bin/enable_dmarc_mitigation.py"
|
||||||
register: dmarc_output
|
register: dmarc_output
|
||||||
vars:
|
vars:
|
||||||
pattern: "^Updated rows: [1-9]\\d*"
|
pattern: "^Updated rows: [1-9]\\d*"
|
||||||
|
@ -571,7 +583,7 @@
|
||||||
- name: Install the staging-sync script
|
- name: Install the staging-sync script
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: prod-to-stg.py
|
src: prod-to-stg.py
|
||||||
dest: "{{ mailman_webui_basedir }}/bin/prod-to-stg.py"
|
dest: "{{ mailman3_webui_basedir }}/bin/prod-to-stg.py"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
when: env == "staging"
|
when: env == "staging"
|
||||||
tags: mailman
|
tags: mailman
|
||||||
|
@ -685,7 +697,7 @@
|
||||||
|
|
||||||
- name: Set the SELinux policy for the static files directory
|
- name: Set the SELinux policy for the static files directory
|
||||||
community.general.sefcontext:
|
community.general.sefcontext:
|
||||||
target: "{{ mailman_webui_basedir }}/static(/.*)?"
|
target: "{{ mailman3_webui_basedir }}/static(/.*)?"
|
||||||
setype: httpd_sys_content_t
|
setype: httpd_sys_content_t
|
||||||
state: present
|
state: present
|
||||||
tags:
|
tags:
|
||||||
|
@ -694,7 +706,7 @@
|
||||||
|
|
||||||
- name: Set the SELinux policy for the templates override directory
|
- name: Set the SELinux policy for the templates override directory
|
||||||
community.general.sefcontext:
|
community.general.sefcontext:
|
||||||
target: "{{ mailman_webui_basedir }}/templates(/.*)?"
|
target: "{{ mailman3_webui_basedir }}/templates(/.*)?"
|
||||||
setype: httpd_sys_content_t
|
setype: httpd_sys_content_t
|
||||||
state: present
|
state: present
|
||||||
tags:
|
tags:
|
||||||
|
@ -702,7 +714,7 @@
|
||||||
- selinux
|
- selinux
|
||||||
|
|
||||||
- name: Apply SELinux changes
|
- name: Apply SELinux changes
|
||||||
ansible.builtin.command: restorecon -irv "{{ mailman_webui_basedir }}"
|
ansible.builtin.command: restorecon -irv "{{ mailman3_webui_basedir }}"
|
||||||
register: restorecon_output
|
register: restorecon_output
|
||||||
changed_when: restorecon_output.stdout is defined and restorecon_output.stdout | length > 0
|
changed_when: restorecon_output.stdout is defined and restorecon_output.stdout | length > 0
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[
|
[
|
||||||
{% for host in mailman_domains %}
|
{% for host in mailman3_domains %}
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"domain": "{{ host }}",
|
"domain": "{{ host }}",
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
"pk": {{ loop.index }}
|
"pk": {{ loop.index }}
|
||||||
},
|
},
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for service_name, service_data in mailman_login.items() %}
|
{% for service_name, service_data in mailman3_login.items() %}
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"name": "{{ service_data.display_name }}",
|
"name": "{{ service_data.display_name }}",
|
||||||
|
|
|
@ -17,4 +17,4 @@ base_url: http://localhost/archives/
|
||||||
|
|
||||||
# Shared API key, must be the identical to the value in HyperKitty's
|
# Shared API key, must be the identical to the value in HyperKitty's
|
||||||
# settings.
|
# settings.
|
||||||
api_key: {{ mailman_hyperkitty_archiver_key }}
|
api_key: {{ mailman3_hyperkitty_archiver_key }}
|
||||||
|
|
|
@ -16,7 +16,7 @@ listinfo_url = /admin/
|
||||||
# Set the paths to be Fedora-compliant
|
# Set the paths to be Fedora-compliant
|
||||||
layout: fhs
|
layout: fhs
|
||||||
|
|
||||||
{% if mailman_debug %}
|
{% if mailman3_debug %}
|
||||||
[devmode]
|
[devmode]
|
||||||
enabled: yes
|
enabled: yes
|
||||||
recipient: ""
|
recipient: ""
|
||||||
|
@ -33,7 +33,7 @@ pid_file: /run/mailman3/master.pid
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
class: mailman.database.postgresql.PostgreSQLDatabase
|
class: mailman.database.postgresql.PostgreSQLDatabase
|
||||||
url: postgresql://mailmanadmin:{{ mailman_mailman_db_pass }}@{{ mailman_db_server }}/mailman
|
url: postgresql://mailmanadmin:{{ mailman3_mailman_db_pass }}@{{ mailman3_db_server }}/mailman
|
||||||
|
|
||||||
[archiver.hyperkitty]
|
[archiver.hyperkitty]
|
||||||
class: mailman_hyperkitty.Archiver
|
class: mailman_hyperkitty.Archiver
|
||||||
|
@ -50,23 +50,23 @@ enable: yes
|
||||||
[webservice]
|
[webservice]
|
||||||
hostname: localhost
|
hostname: localhost
|
||||||
port: 8001
|
port: 8001
|
||||||
admin_user: {{ mailman_rest_api_username }}
|
admin_user: {{ mailman3_rest_api_username }}
|
||||||
admin_pass: {{ mailman_rest_api_password }}
|
admin_pass: {{ mailman3_rest_api_password }}
|
||||||
workers: {{ mailman_rest_api_workers }}
|
workers: {{ mailman3_rest_api_workers }}
|
||||||
|
|
||||||
[logging.root]
|
[logging.root]
|
||||||
level: {{ mailman_log_level }}
|
level: {{ mailman3_log_level }}
|
||||||
path: {{ mailman_log_directory }}/mailman.log
|
path: {{ mailman3_log_directory }}/mailman.log
|
||||||
|
|
||||||
[logging.database]
|
[logging.database]
|
||||||
level: warning
|
level: warning
|
||||||
path: {{ mailman_log_directory }}/database.log
|
path: {{ mailman3_log_directory }}/database.log
|
||||||
|
|
||||||
{% for item in mailman_log_items %}
|
{% for item in mailman3_log_items %}
|
||||||
|
|
||||||
[logging.{{ item }}]
|
[logging.{{ item }}]
|
||||||
level: {{ mailman_log_level }}
|
level: {{ mailman3_log_level }}
|
||||||
path: {{ mailman_log_directory }}/{{ item }}.log
|
path: {{ mailman3_log_directory }}/{{ item }}.log
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ jump_chain: discard
|
||||||
|
|
||||||
[mta]
|
[mta]
|
||||||
# Email is sent on the submission port to bypass spam checking.
|
# Email is sent on the submission port to bypass spam checking.
|
||||||
smtp_port: {{ mailman_smtp_port }}
|
smtp_port: {{ mailman3_smtp_port }}
|
||||||
# Remove DKIM signatures in the email headers.
|
# Remove DKIM signatures in the email headers.
|
||||||
remove_dkim_headers: yes
|
remove_dkim_headers: yes
|
||||||
# Don't process old stale bounces
|
# Don't process old stale bounces
|
||||||
|
|
|
@ -10,11 +10,11 @@ RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
|
||||||
# The timeout should happen on gunicorn side, HTTP proxy should just wait
|
# The timeout should happen on gunicorn side, HTTP proxy should just wait
|
||||||
Timeout 3600
|
Timeout 3600
|
||||||
|
|
||||||
Alias /favicon.ico {{ mailman_webui_basedir }}/static/favicon.ico
|
Alias /favicon.ico {{ mailman3_webui_basedir }}/static/favicon.ico
|
||||||
Alias /robots.txt {{ mailman_webui_basedir }}/static/robots.txt
|
Alias /robots.txt {{ mailman3_webui_basedir }}/static/robots.txt
|
||||||
Alias /static {{ mailman_webui_basedir }}/static
|
Alias /static {{ mailman3_webui_basedir }}/static
|
||||||
|
|
||||||
<Directory "{{ mailman_webui_basedir }}/static">
|
<Directory "{{ mailman3_webui_basedir }}/static">
|
||||||
Order deny,allow
|
Order deny,allow
|
||||||
Allow from all
|
Allow from all
|
||||||
Require all granted
|
Require all granted
|
||||||
|
@ -48,8 +48,8 @@ RewriteRule .* - [F,L]
|
||||||
|
|
||||||
# Old static archives
|
# Old static archives
|
||||||
|
|
||||||
Alias /pipermail/ {{ mailman_webui_basedir }}/old-archives/pipermail/
|
Alias /pipermail/ {{ mailman3_webui_basedir }}/old-archives/pipermail/
|
||||||
<Directory {{ mailman_webui_basedir }}/old-archives/pipermail>
|
<Directory {{ mailman3_webui_basedir }}/old-archives/pipermail>
|
||||||
Options FollowSymLinks
|
Options FollowSymLinks
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|
|
@ -10,10 +10,10 @@ from mailman_web.settings.base import * # noqa: F403
|
||||||
from mailman_web.settings.mailman import * # noqa: F403
|
from mailman_web.settings.mailman import * # noqa: F403
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = '{{ mailman_hyperkitty_cookie_key }}'
|
SECRET_KEY = '{{ mailman3_hyperkitty_cookie_key }}'
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = {{ mailman_hyperkitty_debug }}
|
DEBUG = {{ mailman3_hyperkitty_debug }}
|
||||||
|
|
||||||
ADMINS = (
|
ADMINS = (
|
||||||
('HyperKitty Admin', 'abompard@fedoraproject.org'),
|
('HyperKitty Admin', 'abompard@fedoraproject.org'),
|
||||||
|
@ -27,7 +27,7 @@ SITE_ID = 1
|
||||||
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||||
# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
|
# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
{% for host in mailman_domains %}
|
{% for host in mailman3_domains %}
|
||||||
"{{ host }}",
|
"{{ host }}",
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
".fedoraproject.org",
|
".fedoraproject.org",
|
||||||
|
@ -38,9 +38,9 @@ ALLOWED_HOSTS = [
|
||||||
|
|
||||||
# Mailman API credentials
|
# Mailman API credentials
|
||||||
MAILMAN_REST_API_URL = 'http://localhost:8001'
|
MAILMAN_REST_API_URL = 'http://localhost:8001'
|
||||||
MAILMAN_REST_API_USER = '{{ mailman_rest_api_username }}'
|
MAILMAN_REST_API_USER = '{{ mailman3_rest_api_username }}'
|
||||||
MAILMAN_REST_API_PASS = '{{ mailman_rest_api_password }}'
|
MAILMAN_REST_API_PASS = '{{ mailman3_rest_api_password }}'
|
||||||
MAILMAN_ARCHIVER_KEY = '{{ mailman_hyperkitty_archiver_key }}'
|
MAILMAN_ARCHIVER_KEY = '{{ mailman3_hyperkitty_archiver_key }}'
|
||||||
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
|
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
|
||||||
|
|
||||||
ROOT_URLCONF = 'urls'
|
ROOT_URLCONF = 'urls'
|
||||||
|
@ -68,7 +68,7 @@ INSTALLED_APPS = (
|
||||||
'allauth.account',
|
'allauth.account',
|
||||||
'allauth.socialaccount',
|
'allauth.socialaccount',
|
||||||
'django_mailman3.lib.auth.fedora',
|
'django_mailman3.lib.auth.fedora',
|
||||||
{% for service_name, service_data in mailman_login.items() %}
|
{% for service_name, service_data in mailman3_login.items() %}
|
||||||
{% if service_data.provider != "fedora" %}
|
{% if service_data.provider != "fedora" %}
|
||||||
'allauth.socialaccount.providers.{{ service_data.provider }}',
|
'allauth.socialaccount.providers.{{ service_data.provider }}',
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -130,8 +130,8 @@ DATABASES = {
|
||||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'NAME': 'hyperkitty',
|
'NAME': 'hyperkitty',
|
||||||
'USER': 'hyperkittyapp',
|
'USER': 'hyperkittyapp',
|
||||||
'PASSWORD': '{{ mailman_hyperkitty_db_pass }}',
|
'PASSWORD': '{{ mailman3_hyperkitty_db_pass }}',
|
||||||
'HOST': '{{ mailman_db_server }}',
|
'HOST': '{{ mailman3_db_server }}',
|
||||||
'PORT': '', # Set to empty string for default.
|
'PORT': '', # Set to empty string for default.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,7 @@ SOCIALACCOUNT_ADAPTER = "django_fedora_nosignup.SignUpEnabledSocialAdapter"
|
||||||
|
|
||||||
SOCIALACCOUNT_PROVIDERS = {
|
SOCIALACCOUNT_PROVIDERS = {
|
||||||
'fedora': {
|
'fedora': {
|
||||||
"server_url": "{{ mailman_openidc_server_url }}",
|
"server_url": "{{ mailman3_openidc_server_url }}",
|
||||||
"token_auth_method": "client_secret_post",
|
"token_auth_method": "client_secret_post",
|
||||||
},
|
},
|
||||||
'openid': {
|
'openid': {
|
||||||
|
@ -301,7 +301,7 @@ COMPRESS_OFFLINE = True
|
||||||
HAYSTACK_CONNECTIONS = {
|
HAYSTACK_CONNECTIONS = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'xapian_backend.XapianEngine',
|
'ENGINE': 'xapian_backend.XapianEngine',
|
||||||
'PATH': "{{ mailman_webui_basedir }}/fulltext_index",
|
'PATH': "{{ mailman3_webui_basedir }}/fulltext_index",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ LOGGING = {
|
||||||
'level': 'DEBUG',
|
'level': 'DEBUG',
|
||||||
#'class': 'logging.handlers.RotatingFileHandler',
|
#'class': 'logging.handlers.RotatingFileHandler',
|
||||||
'class': 'logging.handlers.WatchedFileHandler',
|
'class': 'logging.handlers.WatchedFileHandler',
|
||||||
'filename': '{{ mailman_log_directory }}/hyperkitty.log',
|
'filename': '{{ mailman3_log_directory }}/hyperkitty.log',
|
||||||
'formatter': 'verbose',
|
'formatter': 'verbose',
|
||||||
},
|
},
|
||||||
'null': {
|
'null': {
|
||||||
|
|
|
@ -16,8 +16,8 @@ DATABASES = {
|
||||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'NAME': 'hyperkitty',
|
'NAME': 'hyperkitty',
|
||||||
'USER': 'hyperkittyadmin',
|
'USER': 'hyperkittyadmin',
|
||||||
'PASSWORD': '{{ mailman_hyperkitty_admin_db_pass }}',
|
'PASSWORD': '{{ mailman3_hyperkitty_admin_db_pass }}',
|
||||||
'HOST': '{{ mailman_db_server }}',
|
'HOST': '{{ mailman3_db_server }}',
|
||||||
'PORT': '',
|
'PORT': '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue