16 lines
741 B
Django/Jinja
16 lines
741 B
Django/Jinja
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
systemd-run \
|
|
--pty \
|
|
--unit='photoprism-run' \
|
|
--description='photoprism binary call' \
|
|
--property=User={{ host.data.unix_user }} \
|
|
--property=Group={{ host.data.unix_group }} \
|
|
--property=StateDirectory={{ host.data.unix_user }} \
|
|
--property=EnvironmentFile={{ host.data.systemd_env }} \
|
|
--property=WorkingDirectory=/photoprism \
|
|
--property=RootDirectory={{ host.data.undocker_dst }} \
|
|
--property='BindPaths={{ host.data.photoprism_storage_src }}:/photoprism/storage {{ host.data.photoprism_originals_src }}:/photoprism/originals {{ host.data.photoprism_import_src }}:/photoprism/import' \
|
|
--property='BindReadOnlyPaths=/etc/resolv.conf /proc' \
|
|
/photoprism/bin/photoprism $1
|