Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photoprism #132

Merged
merged 7 commits into from
Oct 15, 2022
Merged

Photoprism #132

merged 7 commits into from
Oct 15, 2022

Conversation

RaneyDazed
Copy link
Contributor

Description

Photoprism® is an AI-Powered Photos App for the Decentralized Web. It makes use of the latest technologies to tag and find pictures automatically without getting in your way. You can run it at home, on a private server, or in the cloud. The docs are here
Compose file I based it off of.
From their GitHub

version: '3.5'

services:
  ## Stable Release
  ## Docs: https://docs.photoprism.org/
  photoprism-latest:
    image: photoprism/photoprism:latest
    security_opt:
      - seccomp:unconfined
      - apparmor:unconfined
    ports:
      - "2344:2342" # HTTP port (host:container)
    labels:
      - "traefik.enable=true"
      - "traefik.http.services.latest.loadbalancer.server.port=2342"
      - "traefik.http.routers.latest.entrypoints=websecure"
      - "traefik.http.routers.latest.rule=Host(`latest.localssl.dev`)"
      - "traefik.http.routers.latest.tls.domains[0].main=localssl.dev"
      - "traefik.http.routers.latest.tls.domains[0].sans=*.localssl.dev"
      - "traefik.http.routers.latest.tls=true"
    environment:
      PHOTOPRISM_UID: ${UID:-1000}                   # user id, should match your host user id
      PHOTOPRISM_GID: ${GID:-1000}                   # group id
      PHOTOPRISM_ADMIN_PASSWORD: "photoprism"        # initial "admin" password (minimum 8 characters)
      PHOTOPRISM_AUTH_MODE: "password"               # authentication mode (public, password)
      ## Public server URL incl http:// or https:// and /path, :port is optional
      PHOTOPRISM_SITE_URL: "https://latest.localssl.dev/"
      PHOTOPRISM_SITE_CAPTION: "AI-Powered Photos App"
      PHOTOPRISM_SITE_DESCRIPTION: "Open-Source Photo Management"
      PHOTOPRISM_SITE_AUTHOR: "@photoprism_app"
      PHOTOPRISM_DEBUG: "true"
      PHOTOPRISM_READONLY: "false"
      PHOTOPRISM_EXPERIMENTAL: "false"
      PHOTOPRISM_HTTP_MODE: "debug"
      PHOTOPRISM_HTTP_HOST: "0.0.0.0"
      PHOTOPRISM_HTTP_PORT: 2342
      PHOTOPRISM_HTTP_COMPRESSION: "gzip"     # improves transfer speed and bandwidth utilization (none or gzip)
      PHOTOPRISM_DATABASE_DRIVER: "mysql"
      PHOTOPRISM_DATABASE_SERVER: "mariadb:4001"
      PHOTOPRISM_DATABASE_NAME: "photoprism"
      PHOTOPRISM_DATABASE_USER: "root"
      PHOTOPRISM_DATABASE_PASSWORD: "photoprism"
      PHOTOPRISM_DISABLE_CHOWN: "false"       # disables updating storage permissions via chmod and chown on startup
      PHOTOPRISM_DISABLE_BACKUPS: "false"     # disables backing up albums and photo metadata to YAML files
      PHOTOPRISM_DISABLE_WEBDAV: "false"      # disables built-in WebDAV server
      PHOTOPRISM_DISABLE_SETTINGS: "false"    # disables settings UI and API
      PHOTOPRISM_DISABLE_PLACES: "false"      # disables reverse geocoding and maps
      PHOTOPRISM_DISABLE_EXIFTOOL: "false"    # disables creating JSON metadata sidecar files with ExifTool
      PHOTOPRISM_DISABLE_TENSORFLOW: "false"  # disables all features depending on TensorFlow
      PHOTOPRISM_DETECT_NSFW: "false"         # automatically flags photos as private that MAY be offensive (requires TensorFlow)
      PHOTOPRISM_UPLOAD_NSFW: "false"         # allows uploads that MAY be offensive (no effect without TensorFlow)
      PHOTOPRISM_RAW_PRESETS: "false"         # enables applying user presets when converting RAW files (reduces performance)
      PHOTOPRISM_THUMB_FILTER: "lanczos"      # resample filter, best to worst: blackman, lanczos, cubic, linear
      PHOTOPRISM_THUMB_UNCACHED: "true"       # enables 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: 85             # a higher value increases the quality and file size of JPEG images and thumbnails (25-100)
      TF_CPP_MIN_LOG_LEVEL: 0                 # show TensorFlow log messages for development
    working_dir: "/photoprism"
    volumes:
      - "/photoprism/storage"
      - "/photoprism/originals"

## Join shared "photoprism-develop" network
networks:
  default:
    name: photoprism-develop
    external: true

How Has This Been Tested?

I've tested it on 2 different saltbox servers so far. I'd be happy to hear about how it works for you if you want to give it a try.

  • This is not a test I performed
  • I did not read the paragraph above this before checking this box
  • I have now checked three boxes without reading any of the text
  • I am CHAIR

RaneyDazed and others added 5 commits October 14, 2022 21:42
added main.yml. created defaults dir.
Add main.yml to tasks
Correcting sandbox.yml to make app installable.
formatting fixes
formatting, end with new line.
@maximuskowalski
Copy link
Collaborator

How did you test it? You forgot to include it in sandbox.yml. :)

Made a few minor formatting corrections, will see what the CI checks say.

Remove comments.
fix trailing spaces
@RaneyDazed
Copy link
Contributor Author

Oh no! Crud. Damn I’m dumb :p let me grab my laptop and I’ll take a look at it

@RaneyDazed
Copy link
Contributor Author

all of that yaml formatting you did, I thought it would be fine since A it worked (in saltbox_mod) and B most of it was pulled from other roles. Wonder why vs code didn't catch it. 🤔

@maximuskowalski
Copy link
Collaborator

Oh - its just a pretty thing. We like to line things up so Salty doesn't get twitchy and tilted. No critical spacing in those bits.

Just the missing addition of the role in sandbox.yml

I will try and maybe make a video or something showing you the process of creating a role if I get some time and find something simple enough.

@RaneyDazed
Copy link
Contributor Author

haha ok fair enough. I'll try to do some more reading on ansible as well so that it isn't necessary next time. Thanks for straightening it up!

@owine
Copy link
Collaborator

owine commented Oct 15, 2022

Need to check on this for saltyorg/Saltbox#97

@owine owine merged commit bb43257 into saltyorg:master Oct 15, 2022
@owine owine mentioned this pull request Oct 15, 2022
@RaneyDazed RaneyDazed deleted the photoprism branch November 3, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants