MariaDB: Update config examples to use v11 if possible #3962 #4199

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2024-04-21 11:12:28 +02:00
parent 6745dde7a3
commit 8257b82c01
11 changed files with 36 additions and 25 deletions

View file

@ -6,7 +6,7 @@ services:
photoprism:
build: .
image: photoprism/photoprism:develop
platform: "arm"
platform: "linux/arm"
depends_on:
- mariadb
- dummy-webdav
@ -87,11 +87,12 @@ services:
## Docs: https://mariadb.com/docs/reference/
## Release Notes: https://mariadb.com/kb/en/changes-improvements-in-mariadb-1011/
mariadb:
image: mariadb:10.11
image: yobasystems/alpine-mariadb:latest
platform: "linux/arm"
security_opt: # see https://github.com/MariaDB/mariadb-docker/issues/434#issuecomment-1136151239
- seccomp:unconfined
- apparmor:unconfined
command: --port=4001 --innodb-strict-mode=1 --innodb-buffer-pool-size=256M --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
command: --port=4001 --innodb-buffer-pool-size=256M --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
expose:
- "4001"
ports:
@ -99,12 +100,13 @@ services:
volumes:
- "./scripts/sql/mariadb-init.sql:/docker-entrypoint-initdb.d/init.sql"
environment:
MARIADB_AUTO_UPGRADE: "1"
MARIADB_INITDB_SKIP_TZINFO: "1"
MARIADB_DATABASE: "photoprism"
MARIADB_USER: "photoprism"
MARIADB_PASSWORD: "photoprism"
MARIADB_ROOT_PASSWORD: "photoprism"
MYSQL_AUTO_UPGRADE: "1"
MYSQL_INITDB_SKIP_TZINFO: "1"
MYSQL_ROOT_PASSWORD: "photoprism"
MYSQL_DATABASE: "photoprism"
MYSQL_USER: "photoprism"
MYSQL_PASSWORD: "photoprism"
MYSQL_CHARSET: "utf8mb4"
## Dummy WebDAV Server
dummy-webdav:

View file

@ -12,7 +12,7 @@ single-arch ARM64 images (updated and tested less frequently):
Stable Release : photoprism/photoprism:arm64
Development Preview: photoprism/photoprism:preview-arm64
MariaDB : arm64v8/mariadb:10.11
MariaDB : arm64v8/mariadb:11
If your device meets the system requirements, mostly the same installation instructions
as for regular Linux servers apply:

View file

@ -36,6 +36,7 @@ services:
photoprism:
## Use photoprism/photoprism:preview-arm64 for testing preview builds:
image: photoprism/photoprism:arm64
platform: "linux/arm64"
## Don't enable automatic restarts until PhotoPrism has been properly configured and tested!
## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue:
## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
@ -109,10 +110,11 @@ services:
# - "~/Import:/photoprism/import" # *Optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *Writable* storage folder for cache, database, and sidecar files (DO NOT REMOVE)
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: arm64v8/mariadb:10.11 # ARM64 IMAGE ONLY, DOES NOT WORK ON ARMv7, AMD or Intel
image: arm64v8/mariadb:11 # ARM64 IMAGE ONLY, DOES NOT WORK ON ARMv7, AMD or Intel
platform: "linux/arm64"
## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue:
## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
restart: unless-stopped

View file

@ -31,6 +31,7 @@ services:
photoprism:
## Use photoprism/photoprism:preview-armv7 for testing preview builds:
image: photoprism/photoprism:armv7
platform: "linux/arm"
## Don't enable automatic restarts until PhotoPrism has been properly configured and tested!
## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue:
## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
@ -103,23 +104,29 @@ services:
# - "~/Import:/photoprism/import" # *Optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *Writable* storage folder for cache, database, and sidecar files (DO NOT REMOVE)
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: yobasystems/alpine-mariadb:latest
platform: "linux/arm"
restart: unless-stopped
stop_grace_period: 5s
security_opt:
- seccomp:unconfined
- apparmor:unconfined
command: --innodb-buffer-pool-size=256M --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
## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder:
volumes:
- "./database:/config" # DO NOT REMOVE
- "./database:/var/lib/mysql" # DO NOT REMOVE
## For a list of supported environment variables, see https://hub.docker.com/r/yobasystems/alpine-mariadb/
environment:
MYSQL_ROOT_PASSWORD: insecure
MYSQL_DATABASE: photoprism
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
MYSQL_AUTO_UPGRADE: "1"
MYSQL_INITDB_SKIP_TZINFO: "1"
MYSQL_ROOT_PASSWORD: "insecure"
MYSQL_DATABASE: "photoprism"
MYSQL_USER: "photoprism"
MYSQL_PASSWORD: "insecure"
MYSQL_CHARSET: "utf8mb4"
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.app/getting-started/updates/#watchtower

View file

@ -191,7 +191,7 @@ services:
- "./traefik.yaml:/etc/traefik/traefik.yaml"
- "./certs/:/certs/"
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: mariadb:11

View file

@ -108,7 +108,7 @@ services:
# - "~/Import:/photoprism/import" # *Optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *Writable* storage folder for cache, database, and sidecar files (DO NOT REMOVE)
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: mariadb:11

View file

@ -85,7 +85,7 @@ services:
# - "~/Import:/photoprism/import" # *Optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *Writable* storage folder for cache, database, and sidecar files (DO NOT REMOVE)
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: mariadb:11

View file

@ -111,7 +111,7 @@ services:
count: 1
capabilities: [gpu]
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: mariadb:11

View file

@ -94,7 +94,7 @@ services:
# - "~/Import:/photoprism/import" # *Optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *Writable* storage folder for cache, database, and sidecar files (DO NOT REMOVE)
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: mariadb:11

View file

@ -91,7 +91,7 @@ services:
# - "E:/:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
image: mariadb:11

View file

@ -105,7 +105,7 @@ services:
- "./import:/photoprism/import" # *optional* folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## MariaDB Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue: