diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index a07da4f71..240e67ef0 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -10,13 +10,11 @@ services: - 80:80 # left side is your local port (change if port 80 is already used) volumes: - ~/Photos:/Photos # change ~/Photos to whatever directory you want to use on your local computer - - photoprism-thumbnails:/var/photoprism/thumbnails # keep this + - photoprism-thumbnails:/var/photoprism/thumbnails # keep this (thumbnail cache) environment: - 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) + 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: # keep this image: mysql:latest diff --git a/docker-compose.yml b/docker-compose.yml index 89b29d7b3..f28dd1f20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,13 +10,13 @@ services: volumes: - .:/go/src/github.com/photoprism/photoprism 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 + 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: "/go/src/github.com/photoprism/photoprism/assets/photos/export" + PHOTOPRISM_ORIGINALS_PATH: "/go/src/github.com/photoprism/photoprism/assets/photos/originals" database: image: mysql:latest diff --git a/internal/photoprism/config.go b/internal/photoprism/config.go index 8988dc81e..c57af823b 100644 --- a/internal/photoprism/config.go +++ b/internal/photoprism/config.go @@ -11,7 +11,6 @@ import ( "github.com/urfave/cli" "log" "os" - "path" "time" ) @@ -143,19 +142,19 @@ func (c *Config) SetValuesFromCliContext(context *cli.Context) error { } func (c *Config) CreateDirectories() error { - if err := os.MkdirAll(path.Dir(c.OriginalsPath), os.ModePerm); err != nil { + if err := os.MkdirAll(c.OriginalsPath, os.ModePerm); err != nil { return err } - if err := os.MkdirAll(path.Dir(c.ThumbnailsPath), os.ModePerm); err != nil { + if err := os.MkdirAll(c.ThumbnailsPath, os.ModePerm); err != nil { return err } - if err := os.MkdirAll(path.Dir(c.ImportPath), os.ModePerm); err != nil { + if err := os.MkdirAll(c.ImportPath, os.ModePerm); err != nil { return err } - if err := os.MkdirAll(path.Dir(c.ExportPath), os.ModePerm); err != nil { + if err := os.MkdirAll(c.ExportPath, os.ModePerm); err != nil { return err }