57 lines
3.3 KiB
Django/Jinja
57 lines
3.3 KiB
Django/Jinja
[Unit]
|
|
Description=Podman container-cloud-nextcloud.service
|
|
Documentation=man:podman-generate-systemd(1)
|
|
Wants=network.target
|
|
After=network-online.target
|
|
BindsTo=pod-cloud.service
|
|
After=pod-cloud.service
|
|
OnFailure=status-mail@%n.service
|
|
|
|
[Service]
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
Restart=on-failure
|
|
TimeoutStopSec=70
|
|
ExecStartPre=/bin/rm -f %t/container-cloud-nextcloud.pid %t/container-cloud-nextcloud.ctr-id
|
|
ExecStart=/usr/bin/podman run \
|
|
--conmon-pidfile %t/container-cloud-nextcloud.pid \
|
|
--cidfile %t/container-cloud-nextcloud.ctr-id \
|
|
--cgroups=no-conmon \
|
|
--pod-id-file %t/pod-cloud.pod-id \
|
|
--replace \
|
|
--label "io.containers.autoupdate=image" \
|
|
-dt \
|
|
--add-host=pod-database:{{ services_all_services['database'].address }} \
|
|
-v {{ services_root_directory }}/valkyrie-resolv.conf:/etc/resolv.conf:ro \
|
|
-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html \
|
|
-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data \
|
|
-v ./.config/pod-cloud/database.name:/run/secrets/database.name:ro \
|
|
-v ./.config/pod-cloud/database.user:/run/secrets/database.user:ro \
|
|
-v ./.config/pod-cloud/database.password:/run/secrets/database.password:ro \
|
|
-v ./.config/pod-cloud/admin.user:/run/secrets/admin.user:ro \
|
|
-v ./.config/pod-cloud/admin.password:/run/secrets/admin.password:ro \
|
|
-e POSTGRES_HOST=pod-database:5432 \
|
|
-e POSTGRES_DB_FILE=/run/secrets/database.name \
|
|
-e POSTGRES_USER_FILE=/run/secrets/database.user \
|
|
-e POSTGRES_PASSWORD_FILE=/run/secrets/database.password \
|
|
-e NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/admin.user \
|
|
-e NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/admin.password \
|
|
-e NEXTCLOUD_TRUSTED_DOMAINS="{{ services[services_service_name].domain }}" \
|
|
-e OVERWRITEPROTOCOL="https" \
|
|
-e SMTP_HOST="{{ services[services_service_name].smtp_host }}" \
|
|
-e SMTP_SECURE="ssl" \
|
|
-e SMTP_PORT=465 \
|
|
-e SMTP_AUTHTYPE="PLAIN" \
|
|
-e SMTP_NAME="{{ services[services_service_name].smtp_name }}" \
|
|
-e SMTP_PASSWORD="{{ services[services_service_name].smtp_password }}" \
|
|
-e MAIL_FROM_ADDRESS="cloud" \
|
|
-e MAIL_DOMAIN="{{ services[services_service_name].domain }}" \
|
|
--name=pod-cloud-nextcloud \
|
|
docker.io/library/nextcloud:{{ services_deploy_versions.cloud.nextcloud }}
|
|
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-cloud-nextcloud.ctr-id -t 10
|
|
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-cloud-nextcloud.ctr-id
|
|
PIDFile=%t/container-cloud-nextcloud.pid
|
|
Type=forking
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|