Skip to content

Commit 7d7b806

Browse files
authored
Merge pull request SensorsIot#388 from Paraphraser/20210809-nextcloud-mariadb-old-menu
20210809 MariaDB + Nextcloud - old-menu branch - PR 2 of 3
2 parents e7aabed + b5a201a commit 7d7b806

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

.templates/mariadb/Dockerfile

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

.templates/mariadb/service.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
mariadb:
2-
image: linuxserver/mariadb
2+
build: ./.templates/mariadb/.
33
container_name: mariadb
44
env_file:
55
- ./services/mariadb/mariadb.env
66
volumes:
77
- ./volumes/mariadb/config:/config
8+
- ./volumes/mariadb/db_backup:/backup
89
ports:
910
- "3306:3306"
1011
restart: unless-stopped

.templates/nextcloud/service.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
nextcloud_db:
1818
container_name: nextcloud_db
19-
image: ghcr.io/linuxserver/mariadb
19+
build: ./.templates/mariadb/.
2020
restart: unless-stopped
2121
environment:
2222
- TZ=Etc/UTC
@@ -26,5 +26,8 @@
2626
- MYSQL_PASSWORD=user_password
2727
- MYSQL_DATABASE=nextcloud
2828
- MYSQL_USER=nextcloud
29+
ports:
30+
- "9322:3306"
2931
volumes:
3032
- ./volumes/nextcloud/db:/config
33+
- ./volumes/nextcloud/db_backup:/backup

0 commit comments

Comments
 (0)