summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-05-22 11:35:32 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-05-26 00:28:30 +0200
commita39a6afea620fad2a88a171a3813c8bf211f50e2 (patch)
tree329a06669d881a377424bd4e2e96876425afb0dd /tasks
parentaba2da0757d6d459baa431786c815c74da4e830c (diff)
Deploy the webmap CGI.
We also lower tile expiration time from 8h to 30m to reduce the race condition where the database an the on-disk tiles are not in sync.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/webmap.yml43
1 files changed, 43 insertions, 0 deletions
diff --git a/tasks/webmap.yml b/tasks/webmap.yml
index 92bb58f..d694387 100644
--- a/tasks/webmap.yml
+++ b/tasks/webmap.yml
@@ -372,3 +372,46 @@
- systemd-tmpfiles --create
- meta: flush_handlers
+
+
+- name: Install Python/WSGI dependencies
+ apt: pkg={{ packages }}
+ vars:
+ packages:
+ - uwsgi-core
+ - uwsgi-plugin-python3
+ # TODO[trixie]: install python3-psycopg-c instead
+ - python3-psycopg
+
+- name: Copy webmap-cgi.socket
+ copy: src=etc/systemd/system/webmap-cgi.socket
+ dest=/etc/systemd/system/webmap-cgi.socket
+ owner=root group=root
+ mode=0644
+ notify:
+ - systemctl daemon-reload
+
+- name: Copy webmap-cgi.service
+ copy: src=etc/systemd/system/webmap-cgi.service
+ dest=/etc/systemd/system/webmap-cgi.service
+ owner=root group=root
+ mode=0644
+ notify:
+ - systemctl daemon-reload
+ - Stop webmap-cgi.service
+
+- name: Copy /usr/libexec/webmap-cgi
+ copy: src=./webmap-tools/webmap-cgi
+ dest=/usr/libexec/webmap-cgi
+ owner=root group=root
+ mode=0755
+ notify:
+ - Stop webmap-cgi.service
+
+- meta: flush_handlers
+
+- name: Enable webmap-cgi.socket
+ service: name=webmap-cgi.socket state=started enabled=true
+
+- name: Disable webmap-cgi.service
+ service: name=webmap-cgi.service enabled=false