aboutsummaryrefslogtreecommitdiff
path: root/gerboweb/deploy/setup_notification_proxy.yml
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2020-01-17 11:11:52 +0100
committerjaseg <code@jaseg.net>2020-01-22 15:57:23 +0100
commit314d03748e938f62796313386bad52818e89a793 (patch)
tree73194017f52e239ea269f22b88a7a8315acdfdad /gerboweb/deploy/setup_notification_proxy.yml
parent40ae8e829c5eedf56fc4a3183c40bf10a65b8797 (diff)
downloadgerbolyze-314d03748e938f62796313386bad52818e89a793.tar.gz
gerbolyze-314d03748e938f62796313386bad52818e89a793.tar.bz2
gerbolyze-314d03748e938f62796313386bad52818e89a793.zip
deploy: add notification proxy
Diffstat (limited to 'gerboweb/deploy/setup_notification_proxy.yml')
-rw-r--r--gerboweb/deploy/setup_notification_proxy.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/gerboweb/deploy/setup_notification_proxy.yml b/gerboweb/deploy/setup_notification_proxy.yml
new file mode 100644
index 0000000..3f86412
--- /dev/null
+++ b/gerboweb/deploy/setup_notification_proxy.yml
@@ -0,0 +1,48 @@
+---
+- name: Create notification proxy worker user and group
+ user:
+ name: uwsgi-notification-proxy
+ create_home: no
+ group: uwsgi
+ password: '!'
+ shell: /sbin/nologin
+ system: yes
+
+- name: Create webapp dir
+ file:
+ path: /var/lib/notification-proxy
+ state: directory
+ owner: uwsgi-notification-proxy
+ group: uwsgi
+ mode: 0550
+
+- name: Copy webapp sources
+ copy:
+ src: notification_proxy.py
+ dest: /var/lib/notification-proxy/
+ owner: uwsgi-notification-proxy
+ group: uwsgi
+ mode: 0440
+
+- name: Template webapp config
+ template:
+ src: notification_proxy_config.py.j2
+ dest: /var/lib/notification-proxy/config.py
+ owner: uwsgi-notification-proxy
+ group: root
+ mode: 0660
+
+- name: Copy uwsgi config
+ copy:
+ src: uwsgi-notification-proxy.ini
+ dest: /etc/uwsgi.d/notification-proxy.ini
+ owner: uwsgi-notification-proxy
+ group: uwsgi
+ mode: 0440
+
+- name: Enable uwsgi systemd socket
+ systemd:
+ daemon-reload: yes
+ name: uwsgi-app@notification-proxy.socket
+ enabled: yes
+