From 97d5bcf8cef7dc86d7bf3753e8dd0c482de69184 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 18 Sep 2018 15:13:02 +0200 Subject: [PATCH] Simplified application configuration --- Makefile | 2 +- configs/photoprism.dev.yml | 12 ---------- configs/photoprism.osx.yml | 12 ---------- .../{photoprism.prod.yml => photoprism.yml} | 0 docker-compose.prod.yml | 24 +++++++++---------- docker-compose.yml | 9 ++++++- 6 files changed, 21 insertions(+), 38 deletions(-) delete mode 100644 configs/photoprism.dev.yml delete mode 100644 configs/photoprism.osx.yml rename configs/{photoprism.prod.yml => photoprism.yml} (100%) diff --git a/Makefile b/Makefile index c544abf59..87cc405c6 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ install-assets: cp -r assets/tensorflow /var/photoprism install-config: mkdir -p /etc/photoprism - test -e /etc/photoprism/photoprism.yml || cp -n configs/photoprism.prod.yml /etc/photoprism/photoprism.yml + test -e /etc/photoprism/photoprism.yml || cp -n configs/photoprism.yml /etc/photoprism/photoprism.yml build: $(GOBUILD) cmd/photoprism/photoprism.go js: diff --git a/configs/photoprism.dev.yml b/configs/photoprism.dev.yml deleted file mode 100644 index 409adbef4..000000000 --- a/configs/photoprism.dev.yml +++ /dev/null @@ -1,12 +0,0 @@ -debug: true -darktable-cli: /usr/bin/darktable-cli -assets-path: assets -thumbnails-path: assets/thumbnails -originals-path: assets/photos/originals -import-path: assets/photos/import -export-path: assets/photos/export -server-ip: -server-mode: debug -server-port: 80 -database-driver: mysql -database-dsn: photoprism:photoprism@tcp(database:3306)/photoprism?parseTime=true \ No newline at end of file diff --git a/configs/photoprism.osx.yml b/configs/photoprism.osx.yml deleted file mode 100644 index bf4c6e067..000000000 --- a/configs/photoprism.osx.yml +++ /dev/null @@ -1,12 +0,0 @@ -debug: false -darktable-cli: /Applications/darktable.app/Contents/MacOS/darktable-cli -assets-path: /var/photoprism -thumbnails-path: /var/photoprism/thumbnails -originals-path: ~/Pictures/Originals -import-path: ~/Pictures/Import -export-path: ~/Pictures/Export -server-ip: -server-mode: release -server-port: 8080 -database-driver: mysql -database-dsn: photoprism:photoprism@tcp(localhost:3306)/photoprism?parseTime=true \ No newline at end of file diff --git a/configs/photoprism.prod.yml b/configs/photoprism.yml similarity index 100% rename from configs/photoprism.prod.yml rename to configs/photoprism.yml diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 04a7f628a..a07da4f71 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -4,21 +4,21 @@ version: '3.3' # Usage: docker-compose -f docker-compose.prod.yml up services: - photoprism: - image: photoprism/photoprism # Uses pre-built image from docker hub: https://hub.docker.com/r/photoprism/photoprism/ + photoprism: # change if needed + image: photoprism/photoprism # use pre-built image from docker hub: https://hub.docker.com/r/photoprism/photoprism/ ports: - - 80:80 + - 80:80 # left side is your local port (change if port 80 is already used) volumes: - - ~/Photos:/var/photoprism/photos # Change ~/Photos to whatever directory you want to use on your local computer - - photoprism-thumbnails:/var/photoprism/thumbnails + - ~/Photos:/Photos # change ~/Photos to whatever directory you want to use on your local computer + - photoprism-thumbnails:/var/photoprism/thumbnails # keep this environment: - PHOTOPRISM_ASSETS_PATH: /var/photoprism - PHOTOPRISM_THUMBNAILS_PATH: /var/photoprism/thumbnails - PHOTOPRISM_IMPORT_PATH: /var/photoprism/photos/Import # ~/Photos/Import on your local computer - PHOTOPRISM_EXPORT_PATH: /var/photoprism/photos/Export # ~/Photos/Export on your local computer - PHOTOPRISM_ORIGINALS_PATH: /var/photoprism/photos/Originals # ~/Photos/Originals on your local computer + PHOTOPRISM_ASSETS_PATH: /var/photoprism # keep this + PHOTOPRISM_THUMBNAILS_PATH: /var/photoprism/thumbnails # keep this + PHOTOPRISM_IMPORT_PATH: /Photos/Import # ~/Photos/Import (files to be imported to originals) + PHOTOPRISM_EXPORT_PATH: /Photos/Export # ~/Photos/Export (files exported from originals) + PHOTOPRISM_ORIGINALS_PATH: /Photos/Originals # ~/Photos/Originals (original jpeg, raw and meta files) - database: + database: # keep this image: mysql:latest command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1024 volumes: @@ -29,7 +29,7 @@ services: MYSQL_PASSWORD: photoprism MYSQL_DATABASE: photoprism -volumes: +volumes: # keep this photoprism-thumbnails: driver: local photoprism-database: diff --git a/docker-compose.yml b/docker-compose.yml index 5a981f26a..89b29d7b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,14 @@ services: - 80:80 volumes: - .:/go/src/github.com/photoprism/photoprism - - ./configs/photoprism.dev.yml:/etc/photoprism/photoprism.yml:ro + environment: + PHOTOPRISM_DEBUG: true + PHOTOPRISM_SERVER_MODE: debug + PHOTOPRISM_ASSETS_PATH: /go/src/github.com/photoprism/photoprism/assets + PHOTOPRISM_THUMBNAILS_PATH: /go/src/github.com/photoprism/photoprism/assets/thumbnails + PHOTOPRISM_IMPORT_PATH: /go/src/github.com/photoprism/photoprism/assets/photos/import + PHOTOPRISM_EXPORT_PATH: /var/photoprism/photos/export + PHOTOPRISM_ORIGINALS_PATH: /go/src/github.com/photoprism/photoprism/assets/photos/originals database: image: mysql:latest