Use local user directories for installation #66

This commit is contained in:
Michael Mayer 2019-06-29 19:34:55 +02:00
parent 775cfd61f3
commit 243795c7d5
2 changed files with 21 additions and 20 deletions

View file

@ -25,17 +25,18 @@ start:
migrate:
go run cmd/photoprism/photoprism.go migrate
install-bin:
$(info Building prodution binary...)
scripts/build.sh prod /usr/local/bin/$(BINARY_NAME)
scripts/build.sh prod ~/.local/bin/$(BINARY_NAME)
install-assets:
$(info Installing assets in /srv/photoprism...)
mkdir -p /srv/photoprism/config
mkdir -p /srv/photoprism/photos
mkdir -p /srv/photoprism/cache
mkdir -p /srv/photoprism/resources/database
cp -r assets/resources/static assets/resources/templates assets/resources/nasnet /srv/photoprism/resources
rsync -a -v --ignore-existing assets/config/*.yml /srv/photoprism/config
find /srv/photoprism -name '.*' -type f -delete
$(info Installing assets in ~/photoprism)
mkdir -p ~/.config/photoprism
mkdir -p ~/.cache/photoprism
mkdir -p ~/Pictures/Originals
mkdir -p ~/Pictures/Import
mkdir -p ~/Pictures/Export
mkdir -p ~/.local/share/photoprism/resources/database
cp -r assets/resources/static assets/resources/templates assets/resources/nasnet ~/.local/share/photoprism/resources
rsync -a -v --ignore-existing assets/config/*.yml ~/.config/photoprism
find ~/.local/share/photoprism -name '.*' -type f -delete
dep-js:
(cd frontend && npm install)
dep-go:

View file

@ -1,20 +1,20 @@
debug: false
assets-path: /srv/photoprism
config-path: /srv/photoprism/config
resources-path: /srv/photoprism/resources
cache-path: /srv/photoprism/cache
originals-path: /srv/photoprism/photos/originals
import-path: /srv/photoprism/photos/import
export-path: /srv/photoprism/photos/export
config-path: ~/.config/photoprism
cache-path: ~/.cache/photoprism
assets-path: ~/.local/share/photoprism
resources-path: ~/.local/share/photoprism/resources
originals-path: ~/Pictures/Originals
import-path: ~/Pictures/Import
export-path: ~/Pictures/Export
sql-host: localhost
sql-port: 4000
sql-password: photoprism
http-host:
http-mode: release
http-port: 80
http-port: 2342
http-password:
database-driver: internal
database-dsn: root:photoprism@tcp(localhost:4000)/photoprism?parseTime=true
daemon-pid-path: /srv/photoprism/photoprism.pid
daemon-log-path: /srv/photoprism/photoprism.log
daemon-pid-path: ~/.local/share/photoprism/photoprism.pid
daemon-log-path: ~/.local/share/photoprism/photoprism.log
daemon-mode: false