mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-26 15:55:56 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
24
roles/etherpad/templates/etherpad.service.j2
Normal file
24
roles/etherpad/templates/etherpad.service.j2
Normal file
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=Etherpad ({{ etherpad_id }} Instance)
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ etherpad_user }}
|
||||
Group={{ etherpad_user }}
|
||||
WorkingDirectory={{ etherpad_root_dir }}/app
|
||||
ExecStart=/usr/bin/node ./src/node/server.js
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
NoNewPrivileges=yes
|
||||
MemoryLimit=1024M
|
||||
SyslogIdentifier=etherpad-{{ etherpad_id }}
|
||||
Restart=always
|
||||
Environment=NODE_ENV=production
|
||||
StartLimitInterval=0
|
||||
RestartSec=20
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
7
roles/etherpad/templates/perms.sh.j2
Normal file
7
roles/etherpad/templates/perms.sh.j2
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
restorecon -R {{ etherpad_root_dir }}
|
||||
chown -R {{ etherpad_user }}:{{ etherpad_user }} {{ etherpad_root_dir }}/app
|
||||
find {{ etherpad_root_dir }}/app -type f -exec chmod 644 "{}" \;
|
||||
find {{ etherpad_root_dir }}/app -type d -exec chmod 755 "{}" \;
|
||||
chmod 600 {{ etherpad_root_dir }}/app/{settings.json,SESSIONKEY.txt,APIKEY.txt}
|
3
roles/etherpad/templates/post_backup.sh.j2
Normal file
3
roles/etherpad/templates/post_backup.sh.j2
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -f {{ etherpad_root_dir }}/backup/*
|
12
roles/etherpad/templates/pre_backup.sh.j2
Normal file
12
roles/etherpad/templates/pre_backup.sh.j2
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
/usr/bin/mysqldump \
|
||||
{% if etherpad_db_server not in ['localhost', '127.0.0.1'] %}
|
||||
--user={{ etherpad_db_user }} \
|
||||
--password={{ etherpad_db_pass | quote }} \
|
||||
--host={{ etherpad_db_server }} \
|
||||
{% endif %}
|
||||
--quick --single-transaction \
|
||||
--add-drop-table {{ etherpad_db_name }} | zstd -c > {{ etherpad_root_dir }}/backup/{{ etherpad_db_name }}.sql.zst
|
32
roles/etherpad/templates/settings.json.j2
Normal file
32
roles/etherpad/templates/settings.json.j2
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"title" : "{{ etherpad_title }}",
|
||||
"skinName" : "{{ etherpad_theme }}",
|
||||
"port" : {{ etherpad_port }},
|
||||
"showSettingsInAdminPage" : false,
|
||||
"dbType" : "mysql",
|
||||
"dbSettings" : {
|
||||
"user" : "{{ etherpad_db_user }}",
|
||||
"host" : "{{ etherpad_db_server }}",
|
||||
"port" : {{ etherpad_db_port }},
|
||||
"password" : "{{ etherpad_db_pass }}",
|
||||
"database" : "{{ etherpad_db_name }}",
|
||||
"charset" : "utf8mb4"
|
||||
},
|
||||
"defaultPadText" : "",
|
||||
"socketTransportProtocols" : ["websocket", "xhr-polling", "jsonp-polling", "htmlfile"],
|
||||
"allowUnknownFileEnds" : false,
|
||||
"trustProxy" : true,
|
||||
"users": {
|
||||
"admin": {
|
||||
"password" : "{{ etherpad_admin_pass }}",
|
||||
"is_admin" : true
|
||||
}
|
||||
},
|
||||
"ep_delete_after_delay": {
|
||||
"delay" : 2592000,
|
||||
"loop" : true,
|
||||
"loopDelay" : 3600,
|
||||
"deleteAtStart" : true,
|
||||
"text" : ""
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user