forked from bitlair/ansible
etherpad: New version
This commit is contained in:
parent
19d95cb352
commit
fc5913d56b
7 changed files with 32 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
nodejs_version: node_18.x
|
||||
nodejs_version: 22.x
|
||||
etherpad_db_user: etherpad
|
||||
etherpad_db_password: "{{ lookup('password', '/tmp/etherpad_db_password length=32') }}"
|
||||
etherpad_db_name: etherpad
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
block:
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name: [ gpg, nginx, postgresql, python3-psycopg2 ]
|
||||
name: [ gpg, nginx, postgresql, python3-psycopg2, apt-transport-https ]
|
||||
|
||||
- name: Import nodesource signing key
|
||||
apt_key:
|
||||
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
|
||||
shell: curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
|
||||
args:
|
||||
creates: /usr/share/keyrings/nodesource.gpg
|
||||
notify: apt update
|
||||
|
||||
- name: Install nodesource source list
|
||||
|
@ -19,6 +20,15 @@
|
|||
mode: 0644
|
||||
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
|
||||
|
||||
- name: Install nodejs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Managed by Ansible
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description=Etherpad
|
||||
|
@ -8,10 +8,10 @@ After=network.target
|
|||
Type=simple
|
||||
Restart=always
|
||||
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
|
||||
Environment="NODE_ENV=production"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
|
@ -13,8 +15,10 @@ server {
|
|||
location / {
|
||||
proxy_pass http://127.0.0.1:9001/;
|
||||
include proxy_params;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection $http_connection;
|
||||
}
|
||||
|
||||
include "snippets/acme.conf";
|
||||
|
|
5
roles/etherpad/templates/nodejs-apt-pref
Normal file
5
roles/etherpad/templates/nodejs-apt-pref
Normal file
|
@ -0,0 +1,5 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
Package: nodejs
|
||||
Pin: origin deb.nodesource.com
|
||||
Pin-Priority: 600
|
|
@ -1,4 +1,3 @@
|
|||
# Managed by Ansible
|
||||
# {{ ansible_managed }}
|
||||
|
||||
deb https://deb.nodesource.com/{{ nodejs_version }} {{ ansible_facts.distribution_release }} main
|
||||
deb-src 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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Managed by Ansible
|
||||
// {{ ansible_managed }}
|
||||
|
||||
{
|
||||
"title": "Bitlair Etherpad",
|
||||
|
@ -61,7 +61,7 @@
|
|||
"suppressErrorsInPadText": false,
|
||||
"requireSession": false,
|
||||
"editOnly": false,
|
||||
"minify": true,
|
||||
"minify": false,
|
||||
"maxAge": 21600, // 60 * 60 * 6 = 6 hours
|
||||
"abiword": null,
|
||||
"soffice": null,
|
||||
|
@ -85,8 +85,7 @@
|
|||
"percentageToScrollWhenUserPressesArrowUp": 0
|
||||
},
|
||||
|
||||
|
||||
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
|
||||
"socketTransportProtocols" : ["websocket", "polling"],
|
||||
"socketIo": {
|
||||
"maxHttpBufferSize": 10000
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue