Hi, im new to scale, any knows how can i run photoprism with mariadb? sqlite gets to short to manage my library
My version of truenas : ElectricEel-24.10.0.2
Thanks in advance!!
Hi, im new to scale, any knows how can i run photoprism with mariadb? sqlite gets to short to manage my library
My version of truenas : ElectricEel-24.10.0.2
Thanks in advance!!
Maybe I’m wrong but this?
Hi, finally i get this working, i created a custom YAML , i install mariadb, photoprism and phpmyadmin to see what is happening on db :=)
services:
mariadb:
command: --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED
--character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512
--innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120
environment:
MARIADB_AUTO_UPGRADE: '1'
MARIADB_DATABASE: photoprism
MARIADB_INITDB_SKIP_TZINFO: '1'
MARIADB_PASSWORD: unseccure
MARIADB_ROOT_PASSWORD: unseccure
MARIADB_USER: photoprism
image: mariadb:11
restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
stop_grace_period: 5s
volumes:
- dataset to store database:/var/lib/mysql
phpmyadmin:
image: phpmyadmin:latest
ports:
- 20801:80
environment:
PMA_HOST: mariadb:3306
PMA_USER: photoprism
PMA_PASSWORD: unseccure
restart: unless-stopped
photoprism:
depends_on:
- mariadb
environment:
PHOTOPRISM_ADMIN_PASSWORD: unseccure
PHOTOPRISM_ADMIN_USER: user
PHOTOPRISM_AUTH_MODE: password
PHOTOPRISM_AUTO_IMPORT: -1
PHOTOPRISM_AUTO_INDEX: 300
PHOTOPRISM_BACKUP_ALBUMS: 'true'
PHOTOPRISM_BACKUP_DATABASE: 'true'
PHOTOPRISM_BACKUP_SCHEDULE: daily
PHOTOPRISM_DATABASE_DRIVER: mysql
PHOTOPRISM_DATABASE_NAME: photoprism
PHOTOPRISM_DATABASE_PASSWORD: unseccure
PHOTOPRISM_DATABASE_SERVER: mariadb:3306
PHOTOPRISM_DATABASE_USER: photoprism
PHOTOPRISM_DEFAULT_TLS: 'true'
PHOTOPRISM_DETECT_NSFW: 'false'
PHOTOPRISM_DISABLE_CHOWN: 'false'
PHOTOPRISM_DISABLE_CLASSIFICATION: 'false'
PHOTOPRISM_DISABLE_FACES: 'false'
PHOTOPRISM_DISABLE_RAW: 'false'
PHOTOPRISM_DISABLE_SETTINGS: 'false'
PHOTOPRISM_DISABLE_TENSORFLOW: 'false'
PHOTOPRISM_DISABLE_TLS: 'false'
PHOTOPRISM_DISABLE_VECTORS: 'false'
PHOTOPRISM_DISABLE_WEBDAV: 'false'
PHOTOPRISM_EXPERIMENTAL: 'false'
PHOTOPRISM_HTTP_COMPRESSION: gzip
PHOTOPRISM_INDEX_SCHEDULE: ''
PHOTOPRISM_LOG_LEVEL: info
PHOTOPRISM_ORIGINALS_LIMIT: 5000
PHOTOPRISM_RAW_PRESETS: 'false'
PHOTOPRISM_READONLY: 'false'
PHOTOPRISM_SIDECAR_YAML: 'true'
PHOTOPRISM_SITE_AUTHOR: ''
PHOTOPRISM_SITE_CAPTION: AI-Powered Photos App
PHOTOPRISM_SITE_DESCRIPTION: ''
PHOTOPRISM_SITE_URL: http://url:port/
PHOTOPRISM_UPLOAD_NSFW: 'true'
image: photoprism/photoprism:latest
ports:
- 20800:2342
security_opt:
- seccomp:unconfined
- apparmor:unconfined
stop_grace_period: 10s
volumes:
- pathtophotos:/photoprism/originals
- pathtostorage:/photoprism/storage
working_dir: /photoprism
watchtower:
environment:
WATCHTOWER_CLEANUP: 'true'
WATCHTOWER_POLL_INTERVAL: 7200
image: containrrr/watchtower
profiles:
- update
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/.docker/config.json:/config.json
I attach yaml here, and it helpos someone it will be coool :=)
This was exactly what I was looking for, thank you for sharing! I wondered why the official photoprism app for SCALE does not have an option for using mariadb - they should make it the default to avoid locking issues with SQLite (which I ran into).
One question though (I’m a SCALE beginner, but familiar with docker and docker-compose): I’d like to “combine” the official photoprism app with a self-written mariadb app (or an official one, once available). Doing that manually with compose was quite easy using docker-compose and networks.
Ideally I’d like to configure arbitrary containers within official stacks to not expose anything on the host or for other stacks while automatically getting official updates from upstream. Would that be a reasonable feature request? Another option would be some kind of namespace feature (networks?) where apps can see each other (getting a bit off-topic here…).