diff options
| author | Kumar Damani <me@kumardamani.net> | 2023-01-04 20:13:48 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2023-01-04 20:13:48 +0000 |
| commit | 40c0d09945fdf21601b5b62af9d16b0c254a92b6 (patch) | |
| tree | 3e993f708a3bc073f08290b836340d6131ba3eaf /roles/photoprism | |
| parent | 6c8156a62ee472e5ecefdc1bc3f97b4dd8a72b68 (diff) | |
draft: alpine stuff
Diffstat (limited to 'roles/photoprism')
| -rw-r--r-- | roles/photoprism/defaults/main.yaml | 4 | ||||
| -rw-r--r-- | roles/photoprism/handlers/main.yaml | 2 | ||||
| -rw-r--r-- | roles/photoprism/tasks/main.yaml | 52 |
3 files changed, 58 insertions, 0 deletions
diff --git a/roles/photoprism/defaults/main.yaml b/roles/photoprism/defaults/main.yaml new file mode 100644 index 0000000..29e3605 --- /dev/null +++ b/roles/photoprism/defaults/main.yaml @@ -0,0 +1,4 @@ +# Default Values +--- + +photoprism_docker_network_name: 'photoprism_network' diff --git a/roles/photoprism/handlers/main.yaml b/roles/photoprism/handlers/main.yaml new file mode 100644 index 0000000..cd21505 --- /dev/null +++ b/roles/photoprism/handlers/main.yaml @@ -0,0 +1,2 @@ +--- + diff --git a/roles/photoprism/tasks/main.yaml b/roles/photoprism/tasks/main.yaml new file mode 100644 index 0000000..73d807c --- /dev/null +++ b/roles/photoprism/tasks/main.yaml @@ -0,0 +1,52 @@ +# https://docs.photoprism.app/getting-started/docker-compose/ +--- + +- name: 'Create the photoprism network' + community.docker.docker_network: + name: '{{ photoprism_docker_network_name }}' + state: 'present' + +- name: 'Install Photoprism' + community.docker.docker_container: + name: 'photoprism' + image: 'photoprism/photoprism:latest' + pull: true + state: 'started' + recreate: false + security_opts: + - 'seccomp:unconfined' + - 'apparmor:unconfined' + env: + PHOTOPRISM_ADMIN_PASSWORD: "{{ photoprism_admin_password }}" # INITIAL PASSWORD FOR "admin" USER, MINIMUM 8 CHARACTERS + PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password) + PHOTOPRISM_SITE_URL: "https://photos.kumardamani.net/" # public server URL incl http:// or https:// and /path, :port is optional + PHOTOPRISM_ORIGINALS_LIMIT: "5000" # file size limit for originals in MB (increase for high-res video) + PHOTOPRISM_HTTP_COMPRESSION: "gzip" # improves transfer speed and bandwidth utilization (none or gzip) + PHOTOPRISM_LOG_LEVEL: "info" # log level: trace, debug, info, warning, error, fatal, or panic + PHOTOPRISM_READONLY: "true" # do not modify originals directory (reduced functionality) + PHOTOPRISM_EXPERIMENTAL: "false" # enables experimental features + PHOTOPRISM_DISABLE_CHOWN: "true" # disables updating storage permissions via chmod and chown on startup + PHOTOPRISM_DISABLE_WEBDAV: "true" # disables built-in WebDAV server + PHOTOPRISM_DISABLE_SETTINGS: "false" # disables settings UI and API + PHOTOPRISM_DISABLE_TENSORFLOW: "true" # disables all features depending on TensorFlow + PHOTOPRISM_DISABLE_FACES: "true" # disables face detection and recognition (requires TensorFlow) + PHOTOPRISM_DISABLE_CLASSIFICATION: "true" # disables image classification (requires TensorFlow) + PHOTOPRISM_DISABLE_RAW: "true" # disables indexing and conversion of RAW files + PHOTOPRISM_RAW_PRESETS: "false" # enables applying user presets when converting RAW files (reduces performance) + PHOTOPRISM_JPEG_QUALITY: "85" # a higher value increases the quality and file size of JPEG images and thumbnails (25-100) + 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_DATABASE_DRIVER: "sqlite" # SQLite is an embedded database that doesn't require a server + PHOTOPRISM_SITE_CAPTION: "Photos App" + PHOTOPRISM_SITE_DESCRIPTION: "Some of our pics" # meta site description + PHOTOPRISM_SITE_AUTHOR: "Kumar" # meta site author + PHOTOPRISM_INIT: "gpu tensorflow" + working_dir: "/photoprism" + networks: + - name: '{{ photoprism_docker_network_name }}' + ports: + - '{{ photoprism_host_port }}:2342' + volumes: + - '{{ photoprism_pics_root_dir }}:/photoprism/originals:ro' + - '{{ photoprism_data_dir }}:/photoprism/storage' + restart_policy: "unless-stopped" |
