This commit is contained in:
2025-12-19 16:09:16 +01:00
parent 3c23f3d8d5
commit 4e65dfc3a3
6 changed files with 72 additions and 11 deletions

View File

@@ -0,0 +1,7 @@
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES on nextcloud.* to 'nextcloud'@'localhost';
CREATE USER 'gitea'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost';

40
services/mariadb/my.cnf Normal file
View File

@@ -0,0 +1,40 @@
[mariadb]
host-cache-size = 128
skip-name-resolve = true
[mysqld]
transaction_isolation = READ-COMMITTED
binlog_format = ROW
[server]
skip_name_resolve = 1
innodb_buffer_pool_size = 128M
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
query_cache_type = 1
query_cache_limit = 2M
query_cache_min_res_unit = 2k
query_cache_size = 64M
tmp_table_size= 64M
max_heap_table_size= 64M
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 1
[client-server]
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
[client]
default-character-set = utf8mb4
[mysqld]
character_set_server = utf8mb4
collation_server = utf8mb4_general_ci
transaction_isolation = READ-COMMITTED
binlog_format = ROW
innodb_large_prefix=on
innodb_file_format=barracuda
innodb_file_per_table=1

View File

@@ -0,0 +1,3 @@
FROM nextcloud:31-fpm
COPY ./mysql.ini /usr/local/etc/php/conf.d/mysql.ini

View File

@@ -0,0 +1,16 @@
# configuration for PHP MySQL module
extension=pdo_mysql.so
[mysql]
mysql.allow_local_infile=On
mysql.allow_persistent=On
mysql.cache_size=2000
mysql.max_persistent=-1
mysql.max_links=-1
mysql.default_port=
mysql.default_socket=/var/lib/mysql/mysql.sock # Debian squeeze: /var/run/mysqld/mysqld.sock
mysql.default_host=
mysql.default_user=
mysql.default_password=
mysql.connect_timeout=60
mysql.trace_mode=Off