digikam: add mariadb config
This commit is contained in:
parent
84f9efd785
commit
5e456fe0b2
9 changed files with 141 additions and 18 deletions
10
roles/digikam/files/compose.yml
Normal file
10
roles/digikam/files/compose.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
services:
|
||||
db:
|
||||
image: 'mariadb:11.6'
|
||||
|
||||
env_file: 'mariadb.env'
|
||||
ports:
|
||||
- '8015:3306'
|
||||
volumes:
|
||||
- './init.sql:/docker-entrypoint-initdb.d/init.sql'
|
||||
- '/mnt/data1/digikam/mariadb:/var/lib/mysql'
|
||||
13
roles/digikam/files/digikam.service
Normal file
13
roles/digikam/files/digikam.service
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=Photo management software
|
||||
After=docker.service
|
||||
Requires=docker.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
WorkingDirectory=/etc/digikam
|
||||
ExecStart=/usr/bin/docker compose up
|
||||
ExecStop=/usr/bin/docker compose down
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
6
roles/digikam/files/init.sql
Normal file
6
roles/digikam/files/init.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
create database if not exists digikam_core;
|
||||
create database if not exists digikam_thumbnails;
|
||||
create database if not exists digikam_similarity;
|
||||
create database if not exists digikam_recognition;
|
||||
|
||||
grant all privileges on *.* to 'digikam'@'%';
|
||||
Loading…
Add table
Add a link
Reference in a new issue