improved photoprism one-click template (#721)

* improved photoprism one-click template

* added ofelia daemon --docker directive

* removed unsupported caprover mariadb directives, replaced ofelia with chadburn for scheduling

* changed chadburn image url to docker hub

Co-authored-by: Vasu Bhatia <github@vbh.ai>
This commit is contained in:
Vasu Bhatia 2022-09-25 03:50:21 +05:30 committed by GitHub
parent e6c5d2be95
commit 55b5fa13ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 102 additions and 12 deletions

View File

@ -1,23 +1,113 @@
captainVersion: 4
services:
$$cap_appname:
image: photoprism/photoprism:$$cap_photoprism_version
image: 'photoprism/photoprism:$$app_version'
depends_on:
- $$cap_appname-db
environment:
PHOTOPRISM_ADMIN_PASSWORD: $$app_admin_password
PHOTOPRISM_AUTH_MODE: password
PHOTOPRISM_SITE_URL: 'https://$$cap_appname.$$cap_root_domain'
PHOTOPRISM_ORIGINALS_LIMIT: $$app_upload_size_limit
PHOTOPRISM_HTTP_COMPRESSION: gzip
PHOTOPRISM_UPLOAD_NSFW: 'true'
PHOTOPRISM_DATABASE_DRIVER: mysql
PHOTOPRISM_DATABASE_SERVER: srv-captain--$$cap_appname-db
PHOTOPRISM_DATABASE_NAME: photoprism
PHOTOPRISM_DATABASE_USER: photoprism
PHOTOPRISM_DATABASE_PASSWORD: $$db_password
volumes:
- $$cap_appname-data:/photoprism/originals/
restart: always
- '$$cap_appname-originals:/photoprism/originals'
- '$$cap_appname-storage:/photoprism/storage'
working_dir: /photoprism
labels:
$$cap_appname-chadburn.enabled: $$chadburn_enabled
$$cap_appname-chadburn.job-exec.photoprism_index.schedule: '$$chadburn_index_schedule'
$$cap_appname-chadburn.job-exec.photoprism_index.command: 'photoprism index --cleanup'
caproverExtra:
containerHttpPort: '2342'
$$cap_appname-db:
restart: unless-stopped
image: 'mariadb:$$db_version'
volumes:
- '$$cap_appname-db:/var/lib/mysql'
environment:
MARIADB_AUTO_UPGRADE: '1'
MARIADB_INTDB_SKIP_TZINFO: '1'
MARIADB_DATABASE: photoprism
MARIADB_USER: photoprism
MARIADB_PASSWORD: $$db_password
MARIADB_ROOT_PASSWORD: $$db_root_password
caproverExtra:
notExposeAsWebApp: 'true'
$$cap_appname-chadburn:
restart: unless-stopped
image: 'premoweb/chadburn:$$chadburn_version'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
caproverExtra:
notExposeAsWebApp: 'true'
caproverOneClickApp:
variables:
- id: $$cap_photoprism_version
- id: $$app_version
label: Photoprism Version
defaultValue: '20200427'
description: Check out their Docker page for the valid tags https://hub.docker.com/r/photoprism/photoprism/tags
validRegex: /^([^\s^\/])+$/
defaultValue: 220901-bullseye
description: >-
Check out their Docker page for the valid tags
https://hub.docker.com/r/photoprism/photoprism/tags
validRegex: '/^([^\s^\/])+$/'
- id: $$app_admin_password
label: Photoprism Admin Password
defaultValue: $$cap_gen_random_hex(32)
description: Set a secure password for the admin user
validRegex: '/.{1,}/'
- id: $$app_upload_size_limit
label: File Size Limit
defaultValue: '5000'
description: File Size Limit for Originals in MB
validRegex: '/^([^\s^\/])+$/'
- id: $$db_version
label: Mariadb Version
defaultValue: '10.9'
description: >-
Check out their Docker page for the valid tags
https://hub.docker.com/_/mariadb/tags
validRegex: '/^([^\s^\/])+$/'
- id: $$db_password
label: MariaDB User Password
defaultValue: $$cap_gen_random_hex(32)
description: User password for the database
validRegex: '/.{1,}/'
- id: $$db_root_password
label: MariaDB Root Password
defaultValue: $$cap_gen_random_hex(32)
description: Root password for the database
validRegex: '/.{1,}/'
- id: $$chadburn_version
label: Chadburn Version
defaultValue: 1.0.3
description: >-
Check out their Docker page for the valid tags
https://hub.docker.com/r/premoweb/chadburn/tags
- id: $$chadburn_enabled
label: Enable scheduling for indexing files
defaultValue: false
description: >-
Enable scheduling for indexing files from the originals folder. Useful is the originals folder is shared by another app, like nextcloud, etc. For scheduling imports, etc, simply use the photoprism GUI.
- id: $$chadburn_index_schedule
label: Enable scheduling for indexing files in the originals folder
defaultValue: '@every 1h'
description: >-
Set the time frame for scheduling indexing files from the originals folder. Check out the allowed values here: https://github.com/PremoWeb/chadburn
instructions:
start: PhotoPrism is a server-based application for browsing, organizing and sharing your personal photo collection. We recommend hosting PhotoPrism on a server with at least 2 cores and 4 GB of memory. It makes use of the latest technologies to automatically tag and find pictures without getting in your way.
end: PhotoPrism is deployed and available as $$cap_appname. Please also enable Websockets in the Caprover UI. When you log in the default password is 'photoprism'
displayName: PhotoPrism
start: |-
AI-Powered Photos App for the Decentralized Web
More details: https://photoprism.app/
end: >-
Photoprism has been successfully deployed! Important further steps:
1. Enable HTTPS on the domain.
2. Enable websocket support
displayName: Photoprism (vbbot)
isOfficial: true
description: An app for browsing, organizing and sharing your personal photo collection.
documentation: Taken from https://hub.docker.com/r/photoprism/photoprism
description: AI-Powered Photos App for the Decentralized Web
documentation: 'See https://photoprism.app/'