|
| 1 | +# |
| 2 | +# Copyright (C) 2022 Nethesis S.r.l. |
| 3 | +# SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | +# |
| 5 | + |
| 6 | +[Unit] |
| 7 | +Description=Podman mautic-worker-app.service |
| 8 | +BindsTo=mautic.service |
| 9 | +After=mautic.service mariadb-app.service |
| 10 | + |
| 11 | +[Service] |
| 12 | +Environment=PODMAN_SYSTEMD_UNIT=%n |
| 13 | +EnvironmentFile=%S/state/environment |
| 14 | +EnvironmentFile=-%S/state/smarthost.env |
| 15 | +EnvironmentFile=-%S/state/app.env |
| 16 | +EnvironmentFile=-%S/state/mautic.env |
| 17 | +WorkingDirectory=%S/state |
| 18 | +Restart=always |
| 19 | +TimeoutStopSec=70 |
| 20 | +ExecStartPre=/bin/mkdir -p tmp |
| 21 | +ExecStartPre=/bin/rm -f %t/mautic-worker-app.pid %t/mautic-worker-app.ctr-id |
| 22 | +ExecStartPre=-runagent discover-smarthost |
| 23 | +ExecStart=/usr/bin/podman run --conmon-pidfile %t/mautic-worker-app.pid \ |
| 24 | + --cidfile %t/mautic-worker-app.ctr-id --cgroups=no-conmon \ |
| 25 | + --pod-id-file %t/mautic.pod-id --replace -d --name mautic-worker-app \ |
| 26 | + --volume mautic-config:/var/www/html/config:z \ |
| 27 | + --volume mautic-logs:/var/www/html/var/logs:z \ |
| 28 | + --volume mautic-files:/var/www/html/docroot/media/files:z \ |
| 29 | + --volume mautic-images:/var/www/html/docroot/media/images:z \ |
| 30 | + --volume mautic-cron:/opt/mautic/cron:z \ |
| 31 | + --volume %S/bin/install:/install:z \ |
| 32 | + --env-file=%S/state/app.env \ |
| 33 | + --env-file=%S/state/mautic.env \ |
| 34 | + --env DOCKER_MAUTIC_ROLE=mautic_worker \ |
| 35 | + ${MAUTIC_IMAGE} |
| 36 | +# ExecStartPost=/usr/bin/podman exec mautic-worker-app /bin/bash -c "/install" |
| 37 | +ExecStop=/usr/bin/podman stop --ignore --cidfile %t/mautic-worker-app.ctr-id -t 10 |
| 38 | +ExecReload=/usr/bin/podman kill -s HUP mautic-worker-app |
| 39 | +SyslogIdentifier=%u |
| 40 | +ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/mautic-worker-app.ctr-id |
| 41 | +PIDFile=%t/mautic-worker-app.pid |
| 42 | +Type=forking |
| 43 | + |
| 44 | +[Install] |
| 45 | +WantedBy=default.target |
0 commit comments