From b3c4695cfcd8ee0b64c5a21e1d65323c4d4053e6 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sun, 5 Nov 2023 10:30:14 +0100 Subject: [PATCH] Remove chown container from notes --- .../services/deploy/notes/tasks/main.yml | 1 - .../systemd/container-notes-chown.service | 28 ------------------- .../systemd/container-notes-joplin.service | 5 ++-- 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 playbooks/roles/services/deploy/notes/templates/systemd/container-notes-chown.service diff --git a/playbooks/roles/services/deploy/notes/tasks/main.yml b/playbooks/roles/services/deploy/notes/tasks/main.yml index e024ffc..546a2d1 100644 --- a/playbooks/roles/services/deploy/notes/tasks/main.yml +++ b/playbooks/roles/services/deploy/notes/tasks/main.yml @@ -21,7 +21,6 @@ loop: - "pod-notes.service" - "container-notes-joplin.service" - - "container-notes-chown.service" register: services_deploy_notes_systemd_files - name: "systemd user daemon reload" diff --git a/playbooks/roles/services/deploy/notes/templates/systemd/container-notes-chown.service b/playbooks/roles/services/deploy/notes/templates/systemd/container-notes-chown.service deleted file mode 100644 index f1811af..0000000 --- a/playbooks/roles/services/deploy/notes/templates/systemd/container-notes-chown.service +++ /dev/null @@ -1,28 +0,0 @@ -[Unit] -Description=Podman container-notes-chown.service -Documentation=man:podman-generate-systemd(1) -After=pod-notes.service -Before=container-notes-joplin.service -OnFailure=status-mail@%n.service - -[Service] -Environment=PODMAN_SYSTEMD_UNIT=%n -TimeoutStopSec=70 -ExecStartPre=/bin/rm -f %t/container-notes-chown.pid %t/container-notes-chown.ctr-id -ExecStart=/usr/bin/podman run \ - --conmon-pidfile %t/container-notes-chown.pid \ - --cidfile %t/container-notes-chown.ctr-id \ - --cgroups=no-conmon \ - --pod-id-file %t/pod-notes.pod-id \ - --replace \ - -v {{ services_data_directory }}/pod-notes/data/_data:/data \ - --user=0 \ - --entrypoint="/bin/bash" \ - --name=pod-notes-chown \ - docker.io/joplin/server:{{ services_service_deploy_versions.joplin }} \ - -c "chown -R joplin:joplin /data" -ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-notes-chown.ctr-id -Type=oneshot - -[Install] -WantedBy=container-notes-joplin.service diff --git a/playbooks/roles/services/deploy/notes/templates/systemd/container-notes-joplin.service b/playbooks/roles/services/deploy/notes/templates/systemd/container-notes-joplin.service index 4483a75..b88f63b 100644 --- a/playbooks/roles/services/deploy/notes/templates/systemd/container-notes-joplin.service +++ b/playbooks/roles/services/deploy/notes/templates/systemd/container-notes-joplin.service @@ -4,8 +4,7 @@ Documentation=man:podman-generate-systemd(1) Wants=network.target After=network-online.target BindsTo=pod-notes.service -Requires=container-notes-chown.service -After=pod-notes.service container-notes-chown.service +After=pod-notes.service OnFailure=status-mail@%n.service [Service] @@ -24,7 +23,7 @@ ExecStart=/usr/bin/podman run \ -dt \ -v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \ -v ./.config/service/hosts:/etc/hosts:ro \ - -v {{ services_data_directory }}/pod-notes/data/_data:/data \ + -v {{ services_data_directory }}/pod-notes/data/_data:/data:U \ -e APP_BASE_URL="https://{{ services[services_service_name].domain }}" \ -e APP_PORT="22300" \ -e DB_CLIENT="pg" \