Remove chown container from notes

This commit is contained in:
Wojciech Kozlowski 2023-11-05 10:30:14 +01:00
parent 071c2acd00
commit b3c4695cfc
3 changed files with 2 additions and 32 deletions

View File

@ -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"

View File

@ -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

View File

@ -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" \