Got pleroma otp multi-instance working.
authorLuke Hoersten <luke@hoersten.org>
Sun, 19 Jan 2020 21:51:10 -0600
changeset 87 4f87097dd651
parent 86 3dcdaac4adbf
child 88 63efc98132f7
Got pleroma otp multi-instance working.
roles/pleroma-otp/files/[email protected]
roles/pleroma-otp/tasks/main.yaml
roles/pleroma-otp/templates/pleroma.cloudflare.nginx.conf.j2
--- a/roles/pleroma-otp/files/[email protected]	Sun Jan 19 16:57:51 2020 -0600
+++ b/roles/pleroma-otp/files/[email protected]	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=%[email protected]"
 
-ExecStart=/opt/pleroma/bin/pleroma daemon
+ExecStart=/opt/pleroma/bin/pleroma start
 ExecReload=/opt/pleroma/bin/pleroma stop
 
 KillMode=process
--- 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: "[email protected]"
     dest: "/lib/systemd/system/[email protected]"
   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="[email protected]{{pleroma_instance}}.service" enabled="yes" state="started"
 
--- 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}};