photoprism

This commit is contained in:
Lorenzo Carbonell 2022-02-17 06:52:16 +01:00
parent fb7f26b6cc
commit 6dc573ee64
7 changed files with 139 additions and 0 deletions

21
photoprism/LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Alexander Gorokhov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

29
photoprism/README.md Normal file
View File

@ -0,0 +1,29 @@
# Installation
```
git clone https://github.com/atareao/self-hosted.git
cd self-hosted/photoprism
mkdir Pictures Storage Import
cp sample.env .env
```
If you want to work with Traefik,
```
docker-compose -f docker-compose.yml -f docker-compose.traefik.yml up -d
docker-compose logs -f
```
If you want to work with Caddy,
```
docker-compose -f docker-compose.yml -f docker-compose.caddy.yml up -d
docker-compose logs -f
```
If you want ot work alone,
```
docker-compose -f docker-compose.yml -f docker-compose.default.yml up -d
docker-compose logs -f
```

View File

@ -0,0 +1,13 @@
version: '3'
services:
nginx:
networks:
- proxy
labels:
- caddy="${FQDN}"
- caddy.reverse_proxy="{{upstreams 2432}}"
networks:
proxy:
external: true

View File

@ -0,0 +1,7 @@
version: '3.5'
services:
photoprism:
ports:
- 2342:2342 # [local port]:[container port]

View File

@ -0,0 +1,22 @@
version: '3.5'
services:
photoprism:
networks:
- proxy
labels:
- traefik.enable=true
- traefik.http.services.photoprism.loadbalancer.server.port=2342
- traefik.http.routers.photoprism.entrypoints=web
- traefik.http.routers.photoprism.rule=Host(`${FQDN}`)
- traefik.http.middlewares.photoprism-https-redirect.redirectscheme.scheme=https
- traefik.http.routers.photoprism.middlewares=photoprism-https-redirect
- traefik.http.routers.photoprism-secure.entrypoints=websecure
- traefik.http.routers.photoprism-secure.rule=Host(`${FQDN}`)
- traefik.http.routers.photoprism-secure.tls=true
- traefik.http.routers.photoprism-secure.tls.certresolver=letsencrypt
networks:
proxy:
external: true

View File

@ -0,0 +1,19 @@
version: '3.5'
services:
photoprism:
image: photoprism/photoprism:latest
restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
healthcheck: # Optional
test: "photoprism status"
interval: 60s
timeout: 15s retries: 5
volumes:
- ./Pictures:/photoprism/originals
- ./Storage:/photoprism/storage # Settings, index, sidecar and thumbnails
- ./Import:/photoprism/import # Mounting the import folder is optional

28
photoprism/sample.env Normal file
View File

@ -0,0 +1,28 @@
FQDN=photoprism.tuservidor.es
PHOTOPRISM_DEBUG=false # Run in debug mode (shows additional log messages)
PHOTOPRISM_PUBLIC=false # No authentication required (disables password protection)
PHOTOPRISM_READONLY=false # Don't modify originals directory (reduced functionality)
PHOTOPRISM_UPLOAD_NSFW=true # Allow uploads that MAY be offensive
PHOTOPRISM_DETECT_NSFW=false # Flag photos as private that MAY be off ensive
PHOTOPRISM_EXPERIMENTAL=false # Enable experimental features
PHOTOPRISM_SITE_URL=https://${FQDN}/ # Canonical / public site URL
#PHOTOPRISM_SITE_TITLE=PhotoPrism
#PHOTOPRISM_SITE_CAPTION=Browse Your Life
#PHOTOPRISM_SITE_DESCRIPTION=
#PHOTOPRISM_SITE_AUTHOR=
# PHOTOPRISM_HTTP_HOST=0.0.0.0
# PHOTOPRISM_HTTP_PORT=2342
PHOTOPRISM_SETTINGS_HIDDEN=false # Users can not view or change settings
PHOTOPRISM_ADMIN_PASSWORD=secreto # Initial admin password (can be changed in settings)
PHOTOPRISM_DATABASE_DRIVER: sqlite # Change to mysql for external MySQL o r MariaDB
# PHOTOPRISM_DATABASE_DRIVER=mysql # Using MariaDB or MySQL instead of SQLite is optional
# PHOTOPRISM_DATABASE_DSN: user:passwdhotoprism-db:3306)/photoprism?charset=utf8mb4,utf8&parseTime=true
PHOTOPRISM_SIDECAR_JSON=true # Read metadata from JSON sidecar files created by exiftool
PHOTOPRISM_SIDECAR_YAML=true # Backup photo metadata to YAML sidecar files
PHOTOPRISM_THUMB_FILTER=lanczos # Resample filter, best to worst: blackm an, lanczos, cubic, linear
PHOTOPRISM_THUMB_UNCACHED=false # 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_UNCACHED=7680 # On-demand rendering size limit (defaul t 7680, min 720, max 7680)
PHOTOPRISM_JPEG_SIZE=7680 # Size limit for converted image files i n pixels (720-30000)
PHOTOPRISM_JPEG_QUALITY=92 # Set to 95 for high-quality thumbnails (25-100)
PHOTOPRISM_DARKTABLE_PRESETS=false # Use darktable presets (disables concur rent raw to jpeg conversion)