You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+116Lines changed: 116 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -200,6 +200,63 @@ optional arguments:
200
200
````
201
201
202
202
203
+
Docker Container (mit interner MYSQL Datenbank)
204
+
-----------------------------------------------
205
+
Die Standalone Datenbank inkl. regelmäßiger Aktualisierung (Cronjob) über `mvupdate3` kann in einem Docker Container gehalten werden. Das Image basiert auf auf dem mariadb Container von linuxserver.io (siehe https://docs.linuxserver.io/images/docker-mariadb).
206
+
207
+
208
+
**Container bauen:**
209
+
210
+
Zunächst muss das Repository als zip heruntergeladen und enpackt oder via git clone auf den Rechner mit installierten docker gebracht werden. Danach in das Verseichnis `plugin.video.mediathekview` gehen und das Container Image erstellen:
| PUID | 1000 | für UserID; siehe auch Erklärung auf linuxserver.io|
222
+
| GUID | 1000 | für GroupID; siehe auch Erklärung auf linuxserver.io|
223
+
| TZ | Europe/London | verwendete Zeitzone im Container |
224
+
| MYSQL_DATABASE | mediathekview | Name der MYSQL Datenbank; diese Datenbank wird beim ersten Starten des Containers angelegt|
225
+
| MYSQL_USER | mediathekview | Superuser-Benutzer der o.g. MYSQLS Datenbank|
226
+
| MYSQL_PASSWORD | mediathekview | Passwort für MYSQL_USER (minimum 4 Zeichen); sollte in ein sicheres Passwort geändert werden |
227
+
| MYSQL_ROOT_PASSWORD | mediathekview_root | Root Passwort für die MYSQL Datenbank (minimal 4 Zeichen); sollte in ein sicheres Passwort geändert werden|
228
+
| CRON_TIMESPEC | 0 4-22/1 * * * | Zeitausdruck im Cron-Format, der angibt wann die Datenbank per `mvupdate3` aktualisiert werden soll (Default: zu jeder vollen Stunde zwischen 4 und 22 Uhr). Ein Generator für diese Ausdrücke findet sich bspw. hier: https://crontab.guru/|
229
+
| RUN_ON_STARTUP | no | wenn 'yes', damm wird `mvupdate3` bei starten des Containers ausgeführt
230
+
231
+
232
+
Um mit Kodi auf die Datenbank zugreifen zu können, muss der `Port 3306` nach außen geleitet werden. Bei mehereren Containern mit MYSQL Datenbank empfiehlt es sich den MYSQL-Port 3306 auf einen freien Port umzuleiten (z.B.: `-p 49153:3306`). *Achtung:* Innerhalb des Containers gilt weiterhin der Port 3306 (z.B. für den Aufruf von `mvupdate3`). Außerhalb bzw. in Kodi muss dann der konfigurierte Port (im Beispiel 49153) verwendet werden.
233
+
234
+
Die Datenbank selbst sowie weitere Konfigurationsdaten werden im Ordner `/config` gespeichert. Dieser ist als Docker-Volume konfiguriert (`-v path_to_data:/config`) und seine Daten bleiben auch beim Neuaufsetzen des Containers erhalten.
235
+
236
+
237
+
**Container Starten (Beispielkonfiguration):**
238
+
````
239
+
docker run -d \
240
+
--name mediathekview-kodi-db \
241
+
-e PUID=1000 \
242
+
-e GUID=1000 \
243
+
-e TZ='Europe/Berlin' \
244
+
-e MYSQL_DATABASE='mediathekview' \
245
+
-e MYSQL_USER='mediathekview' \
246
+
-e MYSQL_PASSWORD='mediathekview' \
247
+
-e MYSQL_ROOT_PASSWORD='mediathekview_root' \
248
+
-e CRON_TIMESPEC='0 4-22/1 * * *' \
249
+
-p 3306:3306 \
250
+
-v path_to_data:/config \
251
+
mediathekview-kodi-db
252
+
````
253
+
254
+
255
+
**Hinweise:**
256
+
* Die Log-Ausgabe von `mvupdate3` wird im Docker-Log teilweise erst nach Abschluss der Aktualisierung angezeigt.
257
+
* Um Speicherplatz zu sparen kann das binlog der maria-db abgeschaltet werden. Dazu in `/config/custom.cnf` die Zeile `log_bin = /config/log/mysql/mariadb-bin` durch `skip-log-bin` ersetzen. Weitere Informationen zum Thema binlog gibt es [hier](https://mariadb.com/kb/en/binary-log/).
258
+
259
+
203
260
English Version
204
261
===============
205
262
@@ -383,6 +440,65 @@ optional arguments:
383
440
384
441
385
442
443
+
Docker Container (with internal MYSQL database)
444
+
-----------------------------------------------
445
+
The standalone database inkl. regular update (cronjob) via `mvupdate3` can be run inside a docker container. The image is based on the mariadb container from linuxserver.io (see https://docs.linuxserver.io/images/docker-mariadb).
446
+
447
+
448
+
**Build Container:**
449
+
450
+
Download the repository via zip (+ unpack) or git clone to the computer with installed docker. Then go to `plugin.video.mediathekview` and build the Image :
| PUID | 1000 | for UserID; also see explanation on linuxserver.io|
462
+
| GUID | 1000 | for GroupID; also see explanation on linuxserver.io|
463
+
| TZ | Europe/London | used timezone in the Container |
464
+
| MYSQL_DATABASE | mediathekview | name of the MYSQL database; this database will be created during first startup of the Container|
465
+
| MYSQL_USER | mediathekview | superuser of the MYSQL database|
466
+
| MYSQL_PASSWORD | mediathekview | password for MYSQL_USER (minimum 4 characters); should be changed to a secure password |
467
+
| MYSQL_ROOT_PASSWORD | mediathekview_root | root password for the MYSQL database (minimum 4 characters); should be changed to a secure password|
468
+
| CRON_TIMESPEC | 0 4-22/1 * * * | time specification for cronjob; specifies when database is updated using `mvupdate3` (default: hourly between 4am and 10pm). A generator for cron time specification can be found for example here: https://crontab.guru/|
469
+
| RUN_ON_STARTUP | no | if 'yes', `mvupdate3` will be executed on container startup
470
+
471
+
472
+
473
+
In order to access the database from outside the container (e.g. by Kodi addon) the `port 3306` has to be exposed. However, if using several MYSQL Containers this port should be forwarded to a free port (e.g. `-p 49153:3306`). *Remark:* Inside the container the usual port 3306 is used (e.g. when executing `mvupdate3`). Outside the container resp. in Kodi the configured port (49153 in the example) hast to be used.
474
+
475
+
The database itselve as well as other configuration data is stored in the folder `/config`. This folder is configured as docker volume (`-v path_to_data:/config`) and its content is persistent even if re-initialize the container.
476
+
477
+
478
+
**Start the container (exemplaric):**
479
+
````
480
+
docker run -d \
481
+
--name mediathekview-kodi-db \
482
+
-e PUID=1000 \
483
+
-e GUID=1000 \
484
+
-e TZ='Europe/Berlin' \
485
+
-e MYSQL_DATABASE='mediathekview' \
486
+
-e MYSQL_USER='mediathekview' \
487
+
-e MYSQL_PASSWORD='mediathekview' \
488
+
-e MYSQL_ROOT_PASSWORD='mediathekview_root' \
489
+
-e CRON_TIMESPEC='0 4-22/1 * * *' \
490
+
-p 3306:3306 \
491
+
-v path_to_data:/config \
492
+
mediathekview-kodi-db
493
+
````
494
+
495
+
496
+
**Remarks:**
497
+
* The log output of `mvupdate3` might be shown with a delay in the docker log.
498
+
* In order to safe memory maria-db binlog can be disabled by editing `/config/custom.cnf`: Replace `log_bin = /config/log/mysql/mariadb-bin` with `skip-log-bin`. Further information about binlog can be found [here](https://mariadb.com/kb/en/binary-log/).
0 commit comments