Skip to content

Commit 1deb39b

Browse files
authored
Merge pull request #389 from Paraphraser/20210809-nextcloud-mariadb-experimental
20210809 MariaDB + Nextcloud - experimental branch - PR 3 of 3
2 parents 7a76e82 + 74261fa commit 1deb39b

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Download base image
2+
FROM ghcr.io/linuxserver/mariadb
3+
4+
# apply stability patches recommended in
5+
#
6+
# https://discord.com/channels/638610460567928832/638610461109256194/825049573520965703
7+
# https://stackoverflow.com/questions/61809270/how-to-discover-why-mariadb-crashes
8+
RUN sed -i.bak \
9+
-e "s/^thread_cache_size/# thread_cache_size/" \
10+
-e "s/^read_buffer_size/# read_buffer_size/" \
11+
/defaults/my.cnf
12+
13+
# EOF

.internal/templates/services/mariadb/template.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mariadb:
2-
image: linuxserver/mariadb
2+
build: ./.templates/mariadb/.
33
container_name: mariadb
44
environment:
55
- TZ=Etc/UTC
@@ -11,6 +11,7 @@ mariadb:
1111
- MYSQL_PASSWORD=Unset
1212
volumes:
1313
- ./volumes/mariadb/config:/config
14+
- ./volumes/mariadb/db_backup:/backup
1415
ports:
1516
- "3306:3306"
1617
restart: unless-stopped

.internal/templates/services/nextcloud/template.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ nextcloud:
1919

2020
nextcloud_db:
2121
container_name: nextcloud_db
22-
image: ghcr.io/linuxserver/mariadb
22+
build: ./.templates/mariadb/.
2323
restart: unless-stopped
2424
environment:
2525
- TZ=Etc/UTC
@@ -29,7 +29,10 @@ nextcloud_db:
2929
- MYSQL_PASSWORD=Unset # removed during compile
3030
- MYSQL_DATABASE=nextcloud
3131
- MYSQL_USER=nextcloud
32+
ports:
33+
- "9322:3306"
3234
volumes:
3335
- ./volumes/nextcloud/db:/config
36+
- ./volumes/nextcloud/db_backup:/backup
3437
networks:
3538
- nextcloud_internal

0 commit comments

Comments
 (0)