bundles/radicale: introduce
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
d76f69ab49
commit
a0702416a0
8 changed files with 112 additions and 2 deletions
|
@ -43,6 +43,7 @@ Rule of thumb: keep ports below 10000 free for stuff that reserves ports.
|
||||||
| 22020 | travelynx | Travelynx Web |
|
| 22020 | travelynx | Travelynx Web |
|
||||||
| 22030 | octoprint | OctoPrint Web Interface |
|
| 22030 | octoprint | OctoPrint Web Interface |
|
||||||
| 22040 | miniflux | Miniflux Web Interface |
|
| 22040 | miniflux | Miniflux Web Interface |
|
||||||
|
| 22050 | radicale | radicale carddav and caldav server |
|
||||||
| 45923 | | grafana |
|
| 45923 | | grafana |
|
||||||
|
|
||||||
## UDP
|
## UDP
|
||||||
|
|
25
bundles/radicale/files/config
Normal file
25
bundles/radicale/files/config
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
[server]
|
||||||
|
hosts = [::1]:22050
|
||||||
|
max_connections = 100
|
||||||
|
|
||||||
|
[encoding]
|
||||||
|
request = utf-8
|
||||||
|
stock = utf-8
|
||||||
|
|
||||||
|
[auth]
|
||||||
|
type = http_x_remote_user
|
||||||
|
|
||||||
|
[rights]
|
||||||
|
type = owner_only
|
||||||
|
|
||||||
|
[storage]
|
||||||
|
type = multifilesystem
|
||||||
|
filesystem_folder = /var/lib/radicale/collections/
|
||||||
|
filesystem_locking = True
|
||||||
|
filesystem_fsync = True
|
||||||
|
|
||||||
|
[web]
|
||||||
|
type = internal
|
||||||
|
|
||||||
|
[logging]
|
||||||
|
mask_passwords = True
|
3
bundles/radicale/files/htpasswd
Normal file
3
bundles/radicale/files/htpasswd
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
% for user, password in users.items():
|
||||||
|
${user}:${password}
|
||||||
|
% endfor
|
22
bundles/radicale/files/radicale.service
Normal file
22
bundles/radicale/files/radicale.service
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
[Unit]
|
||||||
|
Description=A simple CalDAV (calendar) and CardDAV (contact) server
|
||||||
|
After=network.target
|
||||||
|
Requires=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/env python3 -m radicale
|
||||||
|
Restart=on-failure
|
||||||
|
User=radicale
|
||||||
|
UMask=0027
|
||||||
|
PrivateTmp=true
|
||||||
|
ProtectSystem=strict
|
||||||
|
ProtectHome=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
NoNewPrivileges=true
|
||||||
|
ReadWritePaths=/var/lib/radicale/collections
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
41
bundles/radicale/items.py
Normal file
41
bundles/radicale/items.py
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
directories = {
|
||||||
|
'/var/lib/radicale/collections': {
|
||||||
|
'owner': 'radicale',
|
||||||
|
'group': 'radicale',
|
||||||
|
'mode': '0700',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
files = {
|
||||||
|
'/etc/systemd/system/radicale.service': {
|
||||||
|
'triggers': {
|
||||||
|
'action:systemd-reload',
|
||||||
|
'svc_systemd:radicale:restart',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'/etc/radicale/config': {
|
||||||
|
'triggers': {
|
||||||
|
'svc_systemd:radicale:restart',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'/etc/radicale/htpasswd': {
|
||||||
|
'content_type': 'mako',
|
||||||
|
'context': {
|
||||||
|
'users': node.metadata.get('radicale', {}).get('users', {}),
|
||||||
|
},
|
||||||
|
'triggers': {
|
||||||
|
'svc_systemd:radicale:restart',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
svc_systemd = {
|
||||||
|
'radicale': {
|
||||||
|
'needs': {
|
||||||
|
'file:/etc/systemd/system/radicale.service',
|
||||||
|
'file:/etc/radicale/config',
|
||||||
|
'file:/etc/radicale/htpasswd',
|
||||||
|
'pkg_apt:python3-radicale',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
12
bundles/radicale/metadata.py
Normal file
12
bundles/radicale/metadata.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
defaults = {
|
||||||
|
'apt': {
|
||||||
|
'packages': {
|
||||||
|
'python3-radicale': {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'users': {
|
||||||
|
'radicale': {
|
||||||
|
'home': '/var/lib/radicale',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://localhost:5232/;
|
proxy_pass http://[::1]:22050;
|
||||||
proxy_set_header X-Script-Name /;
|
proxy_set_header X-Script-Name /;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Remote-User $remote_user;
|
proxy_set_header X-Remote-User $remote_user;
|
||||||
auth_basic "bleps :o";
|
auth_basic "Radicale";
|
||||||
auth_basic_user_file /etc/radicale/htpasswd;
|
auth_basic_user_file /etc/radicale/htpasswd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ nodes['htz.ex42-1048908'] = {
|
||||||
'nodejs',
|
'nodejs',
|
||||||
'riot-web',
|
'riot-web',
|
||||||
'postgresql',
|
'postgresql',
|
||||||
|
'radicale',
|
||||||
'travelynx',
|
'travelynx',
|
||||||
'vmhost',
|
'vmhost',
|
||||||
'voc-loudness-monitor',
|
'voc-loudness-monitor',
|
||||||
|
@ -226,6 +227,11 @@ nodes['htz.ex42-1048908'] = {
|
||||||
},
|
},
|
||||||
'worker_processes': 4,
|
'worker_processes': 4,
|
||||||
},
|
},
|
||||||
|
'radicale': {
|
||||||
|
'users': {
|
||||||
|
'kunsi': vault.decrypt('encrypt$gAAAAABfktUcN5dAS1IP0bQr8Qe54F8UCKLWI3RXscI0xE5he1hx-faiR5grtW4p25mvgxJRw_kDs_dmpahpRztcAjnD8uNEOlFcQefqeVCxyJKsPYiVjN6WsRjAHFd7PoES9gcWln1O'),
|
||||||
|
},
|
||||||
|
},
|
||||||
'riot-web': {
|
'riot-web': {
|
||||||
'url': 'chat.franzi.business',
|
'url': 'chat.franzi.business',
|
||||||
'config': {
|
'config': {
|
||||||
|
|
Loading…
Reference in a new issue