diff --git a/deploy/basics.yml b/deploy/basics.yml index 5d80a067..c57b3af9 100644 --- a/deploy/basics.yml +++ b/deploy/basics.yml @@ -13,6 +13,7 @@ ansible.builtin.command: cmd: openssl dhparam -out /etc/nginx/dhparam.pem 2048 creates: /etc/nginx/dhparam.pem + - name: Install fail2ban apt: pkg: fail2ban @@ -120,7 +121,7 @@ # dest: /etc/postfix/sasl_passwd # content: |- # # After updating, run `sudo postmap hash:/etc/postfix/sasl_passwd`. - # [pine.sfconservancy.org]:587 conference@sfconservancy.org:PASSWORD + # [mail.sfconservancy.org]:587 conference@sfconservancy.org:PASSWORD - name: Configure Postfix envelope rewriting copy: diff --git a/deploy/postfix/main.cf b/deploy/postfix/main.cf index a7ff7537..da6f73f0 100644 --- a/deploy/postfix/main.cf +++ b/deploy/postfix/main.cf @@ -36,8 +36,8 @@ myhostname = symposion.sfconservancy.org alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname -mydestination = $myhostname, symposion.novalocal, symposion, localhost -relayhost = [pine.sfconservancy.org]:587 +mydestination = $myhostname, symposion, localhost +relayhost = [mail.sfconservancy.org]:587 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + @@ -50,7 +50,6 @@ smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_security_level = secure -smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt # Increase default limit of 10M to 50M message_size_limit = 51200000 diff --git a/fabfile.py b/fabfile.py index 7f3cc6f7..d34de72d 100644 --- a/fabfile.py +++ b/fabfile.py @@ -11,7 +11,6 @@ import os from fabric import task # type: ignore from invoke.collection import Collection # type: ignore -from patchwork.files import exists from vps_deploy import django_fabric2 as df2 # type: ignore hosts = os.environ['FABRIC_HOSTS'].split(',') @@ -27,7 +26,7 @@ def deploy(c): install_essentials(c) df2.transfer_files_git(c) df2.init(c) - if not exists(c, c.env.virtualenv): + if not c.run(f'test -e {c.env.virtualenv}', warn=True): c.sudo(f'mkdir -p $(dirname {c.env.virtualenv})') c.sudo(f'chown {c.user} $(dirname {c.env.virtualenv})') c.run('{env.python} -m venv --system-site-packages {env.virtualenv}'.format(env=c.env)) @@ -81,13 +80,13 @@ ns.configure({ 'db_name': 'symposion', 'project_dir': '/srv/symposion_app', 'media_dir': 'media', - 'virtualenv': '/srv/venvs/symposion-django-py39', + 'virtualenv': '/srv/venvs/symposion-django-cp311', 'site_name': 'symposion', 'requirements': 'requirements.txt', 'settings': 'pinaxcon.settings', 'uwsgi_conf': 'deploy/uwsgi.ini', 'nginx_conf': 'deploy/nginx.conf', - 'python': '/usr/bin/python3.9', + 'python': '/usr/bin/python3.11', 'url': 'https://2023.fossy.us/', 'domain': '2023.fossy.us', }, diff --git a/requirements.txt b/requirements.txt index 6cc0c66e..01aa5da7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ pinax-eventlog[django-lts]==5.1.0 django-formset-js==0.5.0 whitenoise==5.2.0 dj-database-url==0.5.0 -pylibmc==1.6.1 +pylibmc==1.6.3 django-debug-toolbar==3.1.1 django-bootstrap-form==3.4 django-settings-export~=1.2.1