Skip to content

Latest commit

 

History

History
executable file
·
132 lines (95 loc) · 9.09 KB

README.md

File metadata and controls

executable file
·
132 lines (95 loc) · 9.09 KB

Photoprism Helm Chart

Helm chart to install PhotoPrism.

PhotoPrism is a server-based application for browsing, organizing, and sharing your personal photo collection.

TL;DR;

helm repo add p80n https://p80n.github.io/photoprism-helm/
helm install photoprism p80n/photoprism --set persistence.enabled=false

Introduction

This chart deploys PhotoPrism to your Kubernetes cluster. It's mostly based off the docker-compose file available at PhotoPrism's GitHub repository.

Kubernetes is great for running PhotoPrism since there are a lot of k8s tools available to enhance the experience:

  • Cert Manager makes it easy to put PhotoPrism behind SSL
  • Ingress makes it easy to expose PhotoPrism with actual URLs
  • Running a database as a separate service helps with performance and maintenance.

Installing the Chart

To install the chart with the release name my-release:

helm install photoprism p80n/photoprism --create-namespace --namespace photoprism -f values.yaml

Configuration

The following table lists common configurable parameters of the Photoprism chart and their default values. See values.yaml for a more complete listing.

Parameter Description Default
adminPassword Password for admin account photoprism
existingSecret Use existing secret for admin account (key PHOTOPRISM_ADMIN_PASSWORD)
image.repository Image repository photoprism/photoprism
image.tag Image tag 20210222
image.pullPolicy Image pull policy IfNotPresent
config Map of environment variables to configure PhotoPrism's runtime behavior
config.PHOTOPRISM_DEBUG Enable verbose logging
config.PHOTOPRISM_PUBLIC Allow passwordless access
sidecarContainers List of container images to run as sidecars
persistence.enabled Enable persistent storage true
persistence.importPath Path to imported images /assets/photos/import
persistence.originalsPath Path to pre-existing photos /assets/photos/originals
persistence.storagePath Location for PhotoPrism to store generated content (e.g., thumbnails) /assets/photos/originals
persistence.volumeMounts VolumeMounts for Photoprism See values.yaml
persistence.volumes Volumes for Photoprism nil
persistence.volumeClaimTemplates VolumeClaimTemplate for Photoprism See values.yaml
service.type Photoprism service type ClusterIP
service.port HTTP to expose service 80
ingress.enabled Enable ingress rules false
ingress.annotations Annotations for ingress {}
ingress.hosts Hosts and paths to respond See values.yaml
ingress.tls Ingress TLS configuration []
resources.requests.memory Indexing photos requires a bit of memory 2Gi
database.driver mysql or internal are supported internal
database.name Remote database name nil
database.user Remote database user nil
database.password Remote database password nil
database.host Remote database host nil
database.port Remote database port nil
database.existingSecret Use existing secret for database DSN (key PHOTOPRISM_DATABASE_DSN)

For setting nested values, it's generally easiest to just specify a YAML file that with the correct values:

$ helm install photoprism p80n/photoprism-helm -f values.yaml

You can specify each parameter using the --set key=value[,key=value] argument to helm install, but for nested values, it's complicated. For example:

$ helm install photoprism p80n/photoprism-helm \
    --set=image.tag=latest \
    --set=volumes[0].name=originals --set=volumes[0].nfs.server=my.nfs.server --set=volumes[0].nfs.path=/path

Config

PhotoPrism's configuration can be passed in through environment variables. To see what is available, you can consult https://github.com/photoprism/photoprism/blob/develop/docker-compose.yml or run docker run photoprism/photoprism photoprism config to see all possible values.

Note: storage and database configuration, as well as the admin password, should be set in their appropriate configuration sections. They should not be set here.

Persistence

It's important to configure persistent storage (e.g., NFS) for any sort of real-world usage.

I've been running PhotoPrism using two NFS shares: one for PhotoPrism's storage cache, and one pointing to where I store my original images in Lightroom (read-only). This has been working well for me; keeping PhotoPrism assets separate keeps my Lightroom workspace uncluttered less cluttered ;)

If you don't enable persistence, you can still take PhotoPrism for a spin; you'll just have to start from scratch if the pod dies and gets scheduled on a different node.

Note: You can utilize the subPath option of a volueMount to only expose a portion of your photo collection. I personally do this, in conjuction with custom ingress hosts and PHOTOPRISM_PUBLIC=true, to share specific galleries with friends with a simple URL (e.g., my-wedding.mydomain.com)

Database

PhotoPrism can be run without any external dependencies. If no remote database is provided, PhotoPrism will run SQLite internally. If you enabled persitent storage and specify a value for persistence.storagePath, this chart will automatically configure the SQLite database file to be written to the persistent storage path.

Alternately, if you prefer to run the database separately, you can point PhotoPrism at a MySQL-compatible database instance (e.g., MySQL, MariaDB, Percona)

Accessing PhotoPrism

The default values will only expose PhotoPrism inside your cluster on port 80. Some options for accessing PhotoPrism from outside your cluster:

Need Help?

If you have questions about this Helm chart, or have trouble getting it deployed to your cluster, feel free to open an issue.

If you have issues with PhotoPrism itself, you may want to head over to their issues page.