From b5ae1a720741ba1fa30fcb23319e7ffb12963835 Mon Sep 17 00:00:00 2001 From: Benoit S Date: Fri, 27 May 2022 21:52:20 +0900 Subject: [PATCH] Update path to new photoprism docker image based on Debian Bookworm --- deploy.py | 2 +- templates/env.j2 | 8 ++++---- templates/photoprism.service.j2 | 2 +- templates/systemd-run.sh.j2 | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy.py b/deploy.py index 4661fc1..04f905b 100644 --- a/deploy.py +++ b/deploy.py @@ -89,7 +89,7 @@ files.directory( ) # If the binary is here, undockerized image should be fine, don't extract again -if not host.fact.file(host.data.undocker_dst+'/photoprism/bin/photoprism'): +if not host.fact.file(host.data.undocker_dst+'/opt/photoprism/bin/photoprism'): server.shell( name='Undocker the Docker image', chdir=host.data.undocker_dst, diff --git a/templates/env.j2 b/templates/env.j2 index 8d0b3c3..3b9c157 100644 --- a/templates/env.j2 +++ b/templates/env.j2 @@ -1,11 +1,11 @@ # From Dockerfile -PHOTOPRISM_ASSETS_PATH="/photoprism/assets" +PHOTOPRISM_ASSETS_PATH="/opt/photoprism/assets" PHOTOPRISM_STORAGE_PATH="/photoprism/storage" -PHOTOPRISM_BACKUP_PATH="/var/lib/photoprism" +PHOTOPRISM_BACKUP_PATH="/photoprism/storage/backups" PHOTOPRISM_ORIGINALS_PATH="/photoprism/originals" PHOTOPRISM_IMPORT_PATH="/photoprism/import" -PHOTOPRISM_LOG_FILENAME="/photoprism/photoprism.log" -PHOTOPRISM_PID_FILENAME="/photoprism/photoprism.pid" +PHOTOPRISM_LOG_FILENAME="/photoprism/storage/photoprism.log" +PHOTOPRISM_PID_FILENAME="/photoprism/storage/photoprism.pid" PHOTOPRISM_DEBUG="false" PHOTOPRISM_PUBLIC="false" PHOTOPRISM_READONLY="false" diff --git a/templates/photoprism.service.j2 b/templates/photoprism.service.j2 index 030d1c1..a4d8309 100644 --- a/templates/photoprism.service.j2 +++ b/templates/photoprism.service.j2 @@ -12,7 +12,7 @@ WorkingDirectory=/photoprism RootDirectory={{ host.data.undocker_dst }} BindPaths={{ host.data.photoprism_storage_src }}:/photoprism/storage {{ host.data.photoprism_originals_src }}:/photoprism/originals {{ host.data.photoprism_import_src }}:/photoprism/import BindReadOnlyPaths=/etc/resolv.conf /proc -ExecStart=/photoprism/bin/photoprism start +ExecStart=/opt/photoprism/bin/photoprism start Restart=on-failure [Install] diff --git a/templates/systemd-run.sh.j2 b/templates/systemd-run.sh.j2 index 66ebb30..a1b6c4a 100644 --- a/templates/systemd-run.sh.j2 +++ b/templates/systemd-run.sh.j2 @@ -13,4 +13,4 @@ systemd-run \ --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 + /opt/photoprism/bin/photoprism $1