# HG changeset patch # User Luke Hoersten # Date 1579492270 21600 # Node ID 4f87097dd651d5500180f5cca0ad18d5bf26df4f # Parent 3dcdaac4adbfe6bf6ce966a366de807b48448791 Got pleroma otp multi-instance working. diff -r 3dcdaac4adbf -r 4f87097dd651 roles/pleroma-otp/files/pleroma@.service --- a/roles/pleroma-otp/files/pleroma@.service Sun Jan 19 16:57:51 2020 -0600 +++ b/roles/pleroma-otp/files/pleroma@.service Sun Jan 19 21:51:10 2020 -0600 @@ -9,8 +9,9 @@ Environment="HOME=/opt/pleroma" Environment="PLEROMA_CONFIG_PATH=/etc/pleroma/%i.config.exs" Environment="PLUG_TMPDIR=/tmp/%i" +Environment="RELEASE_NODE=%i@127.0.0.1" -ExecStart=/opt/pleroma/bin/pleroma daemon +ExecStart=/opt/pleroma/bin/pleroma start ExecReload=/opt/pleroma/bin/pleroma stop KillMode=process diff -r 3dcdaac4adbf -r 4f87097dd651 roles/pleroma-otp/tasks/main.yaml --- a/roles/pleroma-otp/tasks/main.yaml Sun Jan 19 16:57:51 2020 -0600 +++ b/roles/pleroma-otp/tasks/main.yaml Sun Jan 19 21:51:10 2020 -0600 @@ -79,14 +79,14 @@ # - "/tmp/setup_db.psql" # - "/tmp/release/" -- name: "configure pleroma systemd service" +- name: configure pleroma systemd service become: yes copy: src: "pleroma@.service" dest: "/lib/systemd/system/pleroma@.service" notify: restart pleroma instance -- name: "ensure pleroma {{pleroma_instance}} instance is enabled and started" +- name: ensure pleroma instance is enabled and started become: yes systemd: name="pleroma@{{pleroma_instance}}.service" enabled="yes" state="started" diff -r 3dcdaac4adbf -r 4f87097dd651 roles/pleroma-otp/templates/pleroma.cloudflare.nginx.conf.j2 --- a/roles/pleroma-otp/templates/pleroma.cloudflare.nginx.conf.j2 Sun Jan 19 16:57:51 2020 -0600 +++ b/roles/pleroma-otp/templates/pleroma.cloudflare.nginx.conf.j2 Sun Jan 19 21:51:10 2020 -0600 @@ -12,7 +12,7 @@ server { listen {{nginx_port}}; # listen [::]:{{nginx_port}}; - server_name _; + server_name {{nginx_server_name}}; return 301 https://$host$request_uri; } @@ -22,7 +22,7 @@ server { listen {{nginx_ssl_port}} ssl http2; # listen [::]:{{nginx_ssl_port}} ssl ipv6only=on; - server_name _; + server_name {{nginx_server_name}}; ssl_certificate {{nginx_ssl_cert}}; ssl_certificate_key {{nginx_ssl_privkey}};