Postgres: Add docker-compose.postgres.yml, see #47
Postgres support additionally requires a GORM upgrade to 2.0 (v1.20) as the current version doesn't support generic column types like "bytes" (VARBINARY in MySQL, different in Postgres and other SQL dialects). Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
fb984b410d
commit
6577d99363
2 changed files with 70 additions and 0 deletions
69
docker-compose.postgres.yml
Normal file
69
docker-compose.postgres.yml
Normal file
|
@ -0,0 +1,69 @@
|
|||
version: '3.5'
|
||||
|
||||
services:
|
||||
photoprism:
|
||||
build: .
|
||||
image: photoprism/photoprism:develop
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
- apparmor:unconfined
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
- "2342:2342" # Web Server (PhotoPrism)
|
||||
- "2343:2343" # Acceptance Tests
|
||||
volumes:
|
||||
- ".:/go/src/github.com/photoprism/photoprism"
|
||||
- "go-mod:/go/pkg/mod"
|
||||
shm_size: "2gb"
|
||||
environment:
|
||||
TF_CPP_MIN_LOG_LEVEL: 0 # Show TensorFlow log messages for development
|
||||
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
|
||||
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
|
||||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
PHOTOPRISM_SITE_DESCRIPTION: "Open-Source Personal Photo Management"
|
||||
PHOTOPRISM_SITE_AUTHOR: "@browseyourlife"
|
||||
PHOTOPRISM_DEBUG: "true"
|
||||
PHOTOPRISM_READONLY: "false"
|
||||
PHOTOPRISM_PUBLIC: "true"
|
||||
PHOTOPRISM_EXPERIMENTAL: "true"
|
||||
PHOTOPRISM_UPLOAD_NSFW: "false"
|
||||
PHOTOPRISM_DETECT_NSFW: "false"
|
||||
PHOTOPRISM_SERVER_MODE: "debug"
|
||||
PHOTOPRISM_HTTP_HOST: "0.0.0.0"
|
||||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_DATABASE_DRIVER: "postgres"
|
||||
PHOTOPRISM_DATABASE_DSN: "user=photoprism password=photoprism dbname=photoprism host=postgres port=5432 sslmode=disable TimeZone=UTC"
|
||||
PHOTOPRISM_TEST_DRIVER: "sqlite"
|
||||
PHOTOPRISM_TEST_DSN: ".test.db"
|
||||
PHOTOPRISM_ADMIN_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_ASSETS_PATH: "/go/src/github.com/photoprism/photoprism/assets"
|
||||
PHOTOPRISM_STORAGE_PATH: "/go/src/github.com/photoprism/photoprism/storage"
|
||||
PHOTOPRISM_ORIGINALS_PATH: "/go/src/github.com/photoprism/photoprism/storage/originals"
|
||||
PHOTOPRISM_IMPORT_PATH: "/go/src/github.com/photoprism/photoprism/storage/import"
|
||||
PHOTOPRISM_THUMB_FILTER: "lanczos" # Resample filter, best to worst: blackman, lanczos, cubic, linear
|
||||
PHOTOPRISM_THUMB_UNCACHED: "true" # Enable on-demand thumbnail rendering (high memory and cpu usage)
|
||||
PHOTOPRISM_THUMB_SIZE: 2048 # Pre-rendered thumbnail size limit (default 2048, min 720, max 7680)
|
||||
# PHOTOPRISM_THUMB_SIZE: 4096 # Retina 4K, DCI 4K (requires more storage); 7680 for 8K Ultra HD
|
||||
PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680)
|
||||
PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000)
|
||||
PHOTOPRISM_JPEG_QUALITY: 92 # Set to 95 for high-quality thumbnails (25-100)
|
||||
PHOTOPRISM_DARKTABLE_PRESETS: "false" # Use darktable presets (disables concurrent raw to jpeg conversion)
|
||||
PHOTOPRISM_SIDECAR_JSON: "true" # Read metadata from JSON sidecar files created by exiftool
|
||||
PHOTOPRISM_SIDECAR_YAML: "true" # Backup photo metadata to YAML sidecar files
|
||||
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_DB: photoprism
|
||||
POSTGRES_USER: photoprism
|
||||
POSTGRES_PASSWORD: photoprism
|
||||
|
||||
webdav-dummy:
|
||||
image: photoprism/webdav:20200825
|
||||
|
||||
volumes:
|
||||
go-mod:
|
||||
driver: local
|
|
@ -17,6 +17,7 @@ import (
|
|||
const (
|
||||
MySQL = "mysql"
|
||||
SQLite = "sqlite3"
|
||||
// Postgres = "postgres" // TODO: Requires GORM 2.0 for generic column data types
|
||||
)
|
||||
|
||||
// Params provides a struct in which application configuration is stored.
|
||||
|
|
Loading…
Add table
Reference in a new issue