etherpad: New version

This commit is contained in:
polyfloyd 2024-06-01 23:28:45 +02:00
parent 19d95cb352
commit fc5913d56b
7 changed files with 32 additions and 15 deletions

View file

@ -1,4 +1,4 @@
nodejs_version: node_18.x nodejs_version: 22.x
etherpad_db_user: etherpad etherpad_db_user: etherpad
etherpad_db_password: "{{ lookup('password', '/tmp/etherpad_db_password length=32') }}" etherpad_db_password: "{{ lookup('password', '/tmp/etherpad_db_password length=32') }}"
etherpad_db_name: etherpad etherpad_db_name: etherpad

View file

@ -3,11 +3,12 @@
block: block:
- name: Install dependencies - name: Install dependencies
apt: apt:
name: [ gpg, nginx, postgresql, python3-psycopg2 ] name: [ gpg, nginx, postgresql, python3-psycopg2, apt-transport-https ]
- name: Import nodesource signing key - name: Import nodesource signing key
apt_key: shell: curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key args:
creates: /usr/share/keyrings/nodesource.gpg
notify: apt update notify: apt update
- name: Install nodesource source list - name: Install nodesource source list
@ -19,6 +20,15 @@
mode: 0644 mode: 0644
notify: apt update notify: apt update
- name: Install nodejs apt preference
template:
src: nodejs-apt-pref
dest: /etc/apt/preferences.d/nodejs
owner: root
group: root
mode: 0644
notify: apt update
- meta: flush_handlers - meta: flush_handlers
- name: Install nodejs - name: Install nodejs

View file

@ -1,4 +1,4 @@
# Managed by Ansible # {{ ansible_managed }}
[Unit] [Unit]
Description=Etherpad Description=Etherpad
@ -8,10 +8,10 @@ After=network.target
Type=simple Type=simple
Restart=always Restart=always
RestartSec=10s RestartSec=10s
ExecStart=/opt/etherpad/src/bin/run.sh /var/log/etherpad.log ExecStartPre=+/usr/bin/npm install pnpm -g
ExecStart=/opt/etherpad/bin/run.sh /var/log/etherpad.log
User=etherpad User=etherpad
Environment="NODE_ENV=production" Environment="NODE_ENV=production"
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -1,3 +1,5 @@
# {{ ansible_managed }}
server { server {
listen 443 ssl http2 default_server; listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server; listen [::]:443 ssl http2 default_server;
@ -13,8 +15,10 @@ server {
location / { location / {
proxy_pass http://127.0.0.1:9001/; proxy_pass http://127.0.0.1:9001/;
include proxy_params; include proxy_params;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection $http_connection;
} }
include "snippets/acme.conf"; include "snippets/acme.conf";

View file

@ -0,0 +1,5 @@
# {{ ansible_managed }}
Package: nodejs
Pin: origin deb.nodesource.com
Pin-Priority: 600

View file

@ -1,4 +1,3 @@
# Managed by Ansible # {{ ansible_managed }}
deb https://deb.nodesource.com/{{ nodejs_version }} {{ ansible_facts.distribution_release }} main deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_{{ nodejs_version }} nodistro main
deb-src https://deb.nodesource.com/{{ nodejs_version }} {{ ansible_facts.distribution_release }} main

View file

@ -1,4 +1,4 @@
// Managed by Ansible // {{ ansible_managed }}
{ {
"title": "Bitlair Etherpad", "title": "Bitlair Etherpad",
@ -61,7 +61,7 @@
"suppressErrorsInPadText": false, "suppressErrorsInPadText": false,
"requireSession": false, "requireSession": false,
"editOnly": false, "editOnly": false,
"minify": true, "minify": false,
"maxAge": 21600, // 60 * 60 * 6 = 6 hours "maxAge": 21600, // 60 * 60 * 6 = 6 hours
"abiword": null, "abiword": null,
"soffice": null, "soffice": null,
@ -85,8 +85,7 @@
"percentageToScrollWhenUserPressesArrowUp": 0 "percentageToScrollWhenUserPressesArrowUp": 0
}, },
"socketTransportProtocols" : ["websocket", "polling"],
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
"socketIo": { "socketIo": {
"maxHttpBufferSize": 10000 "maxHttpBufferSize": 10000
}, },