mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
radicale: Update to version 3.1.8, move to Quadlet
This commit is contained in:
parent
f367141361
commit
6ead546a9d
@ -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
|
||||
|
@ -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 "$@"
|
||||
|
17
service/radicale/quadlet/radicale.container
Normal file
17
service/radicale/quadlet/radicale.container
Normal 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
|
@ -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/
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user