services: add PhotoPrism

This commit is contained in:
Bruno BELANYI 2020-05-06 23:02:42 +02:00
parent 8464695d8c
commit dbc7d00f51
3 changed files with 83 additions and 1 deletions

1
.gitignore vendored
View file

@ -21,6 +21,7 @@ embystat
sabnzbd
nzbhydra2
komga
photoprism
/letsencrypt/*
!/letsencrypt/nginx/

View file

@ -1,4 +1,4 @@
version: "2"
version: "3"
services:
letsencrypt:
@ -305,3 +305,51 @@ services:
ports:
- 8082:8080
user: 1000:1000
photoprism:
image: photoprism/photoprism:latest
container_name: photoprism
restart: unless-stopped
healthcheck:
test: "photoprism status"
interval: 60s
timeout: 15s
retries: 5
environment:
PHOTOPRISM_URL: "https://photoprism.belanyi.fr"
PHOTOPRISM_TITLE: "PhotoPrism"
PHOTOPRISM_SUBTITLE: "Browse your life"
PHOTOPRISM_DESCRIPTION: "Personal Photo Management powered by Go and Google TensorFlow. Free and open-source."
PHOTOPRISM_AUTHOR: "Anonymous"
PHOTOPRISM_TWITTER: "@browseyourlife"
PHOTOPRISM_UPLOAD_NSFW: "true"
PHOTOPRISM_DETECT_NSFW: "true"
PHOTOPRISM_EXPERIMENTAL: "false"
PHOTOPRISM_DEBUG: "false"
PHOTOPRISM_READONLY: "false"
PHOTOPRISM_PUBLIC: "false"
PHOTOPRISM_DISABLE_SETTINGS: "false"
PHOTOPRISM_HTTP_HOST: "0.0.0.0"
PHOTOPRISM_HTTP_PORT: 2342
PHOTOPRISM_TIDB_HOST: "0.0.0.0"
PHOTOPRISM_TIDB_PORT: 2343 # Port for built-in TiDB SQL server (driver "tidb")
PHOTOPRISM_TIDB_PASSWORD: "photoprism" # Plain text only (username "root")
PHOTOPRISM_ADMIN_PASSWORD: "$$2y$$10$$5/1WPeVMXk4SjBKyDdbqhuQU3RPiYyGZGl8yh0Fxa9eno6Ou/FbSi" # Plain text or bcrypt hash (escape "$" with "$$")
#PHOTOPRISM_WEBDAV_PASSWORD: "photoprism" # Plain text only (username "photoprism")
PHOTOPRISM_DATABASE_DRIVER: "tidb" # Change to "mysql" for external MySQL or MariaDB
PHOTOPRISM_DATABASE_DSN: "root:photoprism@tcp(localhost:2343)/photoprism?parseTime=true"
PHOTOPRISM_JPEG_QUALITY: 90 # Use 95 for high-quality thumbnails (requires more storage)
PHOTOPRISM_THUMB_FILTER: "lanczos" # Resample filter, best to worst: blackman, lanczos, cubic, linear
PHOTOPRISM_THUMB_UNCACHED: "false" # On-demand rendering of default thumbnails (high memory and cpu usage)
PHOTOPRISM_THUMB_SIZE: 2048 # Default thumbnail size limit (default 2048, min 720, max 3840)
PHOTOPRISM_THUMB_LIMIT: 3840 # On-demand thumbnail size limit (default 2048, min 720, max 3840)
volumes:
- ~/pictures/originals:/photoprism/originals
- ~/pictures/import:/photoprism/import
- ./photoprism/config:/photoprism/config
- ./photoprism/cache:/photoprism/cache
- ./photoprism/database:/photoprism/database
ports:
- 2342:2342
- 2343:2343
user: 1000:1000

View file

@ -0,0 +1,33 @@
# make sure that your dns has a cname set for adguard and that your adguard container is named adguard
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name photoprism.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /login;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app photoprism;
set $upstream_port 2342;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}