radicale: Update to version 3.1.8, move to Quadlet

This commit is contained in:
Alex Palaistras 2023-08-12 11:26:49 +01:00
parent f367141361
commit 6ead546a9d
5 changed files with 26 additions and 34 deletions

View File

@ -1,18 +1,17 @@
FROM docker.io/debian:bullseye-slim
ARG VERSION=3.1.5
FROM docker.io/debian:bookworm-slim
ARG VERSION=3.1.8
RUN apt-get update -y && apt-get install -y --no-install-recommends \
python3 python3-pip python3-setuptools gettext
python3 python3-pip python3-venv gettext
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install radicale==$VERSION https://github.com/Unrud/RadicaleIMAP/archive/master.tar.gz
RUN python3 -m venv /venv && \
/venv/bin/pip install radicale==$VERSION https://github.com/Unrud/RadicaleIMAP/archive/master.tar.gz
RUN addgroup --system --gid 15232 radicale
RUN adduser --system --uid 15232 --ingroup radicale --home /var/lib/radicale radicale
COPY container/config /etc/radicale
COPY --chown=radicale:radicale container/config /etc/radicale
COPY container/run-radicale /run-radicale
RUN chown -R radicale:radicale /etc/radicale
USER radicale
EXPOSE 5232

View File

@ -6,4 +6,4 @@ for file in /etc/radicale/*.template; do
envsubst "${ENV_NAMES}" < "$file" > "`echo $file | awk -F '.template$' '{print $1}'`"
done
/usr/local/bin/radicale --config /etc/radicale/radicale.conf "$@"
/venv/bin/radicale --config /etc/radicale/radicale.conf "$@"

View File

@ -0,0 +1,17 @@
[Unit]
Description=Radicale CalDAV and CardDAV Server
Wants=container-build@%N.service container-volume@%N.service dovecot.service
After=container-build@%N.service container-volume@%N.service dovecot.service
[Container]
ContainerName=%N
EnvironmentFile=%E/coreos-home-server/%N/%N.env
Image=localhost/%N:latest
Network=internal
Volume=%N:/var/lib/%N:z
[Service]
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -4,9 +4,5 @@ storage:
trees:
- path: /etc/coreos-home-server/radicale
local: service/radicale/
- path: /etc/systemd/system
local: service/radicale/systemd/
systemd:
units:
- name: radicale.service
enabled: true
- path: /etc/containers/systemd
local: service/radicale/quadlet/

View File

@ -1,20 +0,0 @@
[Unit]
Description=Radicale CalDAV and CardDAV Server
Wants=container-build@%N.service container-volume@%N.service dovecot.service
After=container-build@%N.service container-volume@%N.service dovecot.service
[Service]
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \
--env-file %E/coreos-home-server/%N/%N.env \
--volume %N:/var/lib/%N:z \
localhost/%N:latest
ExecStop=/bin/podman stop --ignore --time 10 %N
ExecStopPost=/bin/podman rm --ignore --force %N
[Install]
WantedBy=multi-user.target