Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| anwenderwiki:webapps:mrbs:mrbs24 [2024/06/15 14:59] – [MRBS Raumbuchung in Version > 1.11.x in docker] tobias | anwenderwiki:webapps:mrbs:mrbs24 [2024/06/15 21:05] (aktuell) – [Docker Image von MRBS] tobias | ||
|---|---|---|---|
| Zeile 6: | Zeile 6: | ||
| ===== Docker Image+Theme von Dorian ===== | ===== Docker Image+Theme von Dorian ===== | ||
| - | Hier: https:// | + | == Vorbemerkung == |
| + | |||
| + | Hier: https:// | ||
| Zusätzlich zur neueren Version von mrbs (und php) ist darin auch ein von ihm erstelltes neueres Theme eingebaut, source code: https:// | Zusätzlich zur neueren Version von mrbs (und php) ist darin auch ein von ihm erstelltes neueres Theme eingebaut, source code: https:// | ||
| - | Siehe https:// | + | ==== Diskussion ==== |
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | ==== Konfiguration ==== | ||
| + | |||
| + | |||
| + | Siehe https:// | ||
| ==== LDAP Konfiguration für linuxmuster ==== | ==== LDAP Konfiguration für linuxmuster ==== | ||
| - | Das ist der Teil, der in '' | + | Das ist der Teil für LDAP, der in '' |
| < | < | ||
| Zeile 22: | Zeile 33: | ||
| $auth[" | $auth[" | ||
| - | // Many of the LDAP parameters can be specified as arrays, in order to | ||
| - | // specify multiple LDAP directories to search within. Each item below | ||
| - | // will specify whether the item can be specified as an array. If any | ||
| - | // parameter is specified as an array, then EVERY array configuration | ||
| - | // parameter must have the same number of elements. You can specify a | ||
| - | // parameter as an array as in the following example: | ||
| - | // | ||
| - | // $ldap_host = array(' | ||
| $ldap_host = " | $ldap_host = " | ||
| - | $ldap_port = 389; | + | $ldap_port = 636; |
| - | $ldap_v3 = true; | + | $ldap_v3 = false; |
| $ldap_tls = false; | $ldap_tls = false; | ||
| + | ldap_set_option(null, | ||
| $ldap_base_dn = " | $ldap_base_dn = " | ||
| Zeile 48: | Zeile 52: | ||
| // Schüler oder Lehrer dürfen zugreifen: | // Schüler oder Lehrer dürfen zugreifen: | ||
| // | // | ||
| - | |||
| - | // If you need to filter a user by the group a user is in with an LDAP | ||
| - | // directory which stores group membership in the group object | ||
| - | // (like OpenLDAP) then you need to search for the groups they are | ||
| - | // in. If you want to do this, define the following two variables, an | ||
| - | // an appropriate $ldap_filter. e.g.: | ||
| - | // $ldap_filter_base_dn = " | ||
| - | // $ldap_filter_user_attr = " | ||
| - | // $ldap_filter = " | ||
| - | |||
| - | // If you need to disable client referrals, this should be set to true. | ||
| - | // Note: Active Directory for Windows 2003 forward requires this. | ||
| - | // $ldap_disable_referrals = true; | ||
| - | |||
| - | // LDAP option for dereferencing aliases | ||
| - | // LDAP_DEREF_NEVER = 0 - (default) aliases are never dereferenced. | ||
| - | // LDAP_DEREF_SEARCHING = 1 - aliases should be dereferenced during the search | ||
| - | // but not when locating the base object of the search. | ||
| - | // LDAP_DEREF_FINDING = 2 - aliases should be dereferenced when locating the base object but not during the search. | ||
| - | // LDAP_DEREF_ALWAYS = 3 - aliases should be dereferenced always. | ||
| - | // | ||
| // Set to true to tell MRBS to look up a user's email address in LDAP. | // Set to true to tell MRBS to look up a user's email address in LDAP. | ||
| // Utilises $ldap_email_attrib below | // Utilises $ldap_email_attrib below | ||
| $ldap_get_user_email = true; | $ldap_get_user_email = true; | ||
| - | // The LDAP attribute which holds a user's email address | ||
| - | // This can be an array. | ||
| $ldap_email_attrib = ' | $ldap_email_attrib = ' | ||
| - | // The LDAP attribute which holds a user's name. Another common attribute | ||
| - | // to use (with Active Directory) is ' | ||
| - | // This can be an array. | ||
| $ldap_name_attrib = ' | $ldap_name_attrib = ' | ||
| - | |||
| - | // The DN of the LDAP group that MRBS admins must be in. If this is defined | ||
| - | // then the $auth[" | ||
| - | // This can be an array. | ||
| // Hier wären alle Lehrer auch Admins: | // Hier wären alle Lehrer auch Admins: | ||
| Zeile 91: | Zeile 65: | ||
| $ldap_suppress_invalid_credentials = true; | $ldap_suppress_invalid_credentials = true; | ||
| $ldap_debug = false; | $ldap_debug = false; | ||
| + | </ | ||
| + | |||
| + | ==== Debugging ==== | ||
| + | |||
| + | Wer Probleme hat, herauszubekommen, | ||
| + | |||
| + | < | ||
| + | ini_set(' | ||
| + | ini_set(' | ||
| + | error_reporting(-1); | ||
| + | </ | ||
| + | |||
| + | in der config.inc.php wirft ordentlich Fehler aus. | ||
| + | Ebenso kann man das Theme von Dorian deaktivieren, | ||
| + | < | ||
| + | $theme = " | ||
| + | </ | ||
| + | setzt. Hat allerdings bei mir nur Nachteile gehabt. | ||
| + | |||
| + | Zusätzlich gibt es noch die Problematik mit LDAPs (SSL) und selbst-signierten Zertifikaten des LDAP-Servers. Die obige Zeile '' | ||
| + | |||
| + | Die Zeile oben '' | ||
| + | |||
| + | ==== Weitere Anpassungen: | ||
| + | |||
| + | < | ||
| + | $override_locale = " | ||
| + | |||
| + | // Bezeichnungen anpassen | ||
| + | $vocab_override[' | ||
| + | $vocab_override[' | ||
| + | $vocab_override[' | ||
| + | $vocab_override[' | ||
| + | $vocab_override[' | ||
| + | |||
| + | unset($booking_types); | ||
| + | $booking_types[] = " | ||
| + | $booking_types[] = " | ||
| + | $booking_types[] = " | ||
| + | $vocab_override[" | ||
| + | $vocab_override[" | ||
| + | $vocab_override[" | ||
| + | |||
| + | // Default type for new bookings | ||
| + | $default_type = " | ||
| + | |||
| + | $mrbs_company = " | ||
| + | $mrbs_company_logo = " | ||
| + | |||
| + | </ | ||
| + | |||
| + | Auch hier: '' | ||
| + | |||
| + | ==== Weitere Anpassungen: | ||
| + | < | ||
| + | $kiosk_mode_enabled = true; | ||
| + | $kiosk_QR_code = true; | ||
| + | $style_weekends = true; | ||
| + | </ | ||
| + | |||
| + | sprechen für sich (man darf halt Sa+So nicht ausblenden, dann sieht man auch, was '' | ||
| + | |||
| + | |||
| + | ==== Weitere Anpassungen (optional) ==== | ||
| + | |||
| + | Beispielhaft von meiner Schule: | ||
| + | < | ||
| + | |||
| + | // Wochenstart Montags | ||
| + | $weekstarts = 1; | ||
| + | // Samstag und Sonntag verstecken | ||
| + | $hidden_days = array(" | ||
| + | |||
| + | // should areas be shown as a list or a drop-down select box? | ||
| + | $area_list_format = " | ||
| + | // | ||
| + | |||
| + | // Define default starting view (month, week or day) | ||
| + | // Default is day | ||
| + | $default_view = " | ||
| + | |||
| + | // Damit die Stundeneinteilung verwendet wird, muss in der | ||
| + | // Weboberfläche der Modus für den entsprechenden Raumbereich auf | ||
| + | // " | ||
| + | unset($periods); | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | $periods[] = " | ||
| + | </ | ||
| + | |||
| + | ==== Docker compose Anpassungen ==== | ||
| + | |||
| + | Neben der Dokumentation von Dorian zum Image hier: https:// | ||
| + | habe ich noch folgende Anpassungen gemacht: | ||
| + | |||
| + | < | ||
| + | mrbs-devel-db: | ||
| + | ... | ||
| + | image: mariadb: | ||
| + | ... | ||
| + | mrbs-devel: | ||
| + | ... | ||
| + | image: dorianim/ | ||
| + | ... | ||
| + | environment: | ||
| + | ... | ||
| + | volumes: | ||
| + | ... | ||
| + | - ./ | ||
| + | - ./ | ||
| + | - ./ | ||
| + | </ | ||
| + | |||
| + | mit dem Inhalt von '' | ||
| + | < | ||
| + | TLS_CACERT | ||
| + | PORT 636 | ||
| + | TLS_REQCERT | ||
| </ | </ | ||
| Zeile 102: | Zeile 203: | ||
| https:// | https:// | ||
| + | < | ||
| + | cd /srv/docker | ||
| + | mkdir -p mrbs-devel/ | ||
| + | touch mrbs-devel/ | ||
| + | |||
| + | git clone https:// | ||
| + | touch mrbs-code/ | ||
| + | </ | ||
| + | |||
| + | |||
| + | Folgendes Dockerfile hilft, einen MRBS-Container zu bekommen, der LDAP-selbst-signierte Zertifikate ignoriert und das standard-theme nutzt. | ||
| + | |||
| + | < | ||
| + | FROM php: | ||
| + | |||
| + | RUN a2enmod rewrite | ||
| + | RUN apt-get update && apt-get install -y libicu72 libicu-dev locales-all libldap2-dev \ | ||
| + | && docker-php-ext-install mysqli pdo pdo_mysql intl \ | ||
| + | && docker-php-ext-configure ldap --with-libdir=lib/ | ||
| + | && docker-php-ext-install ldap \ | ||
| + | && apt-get clean -y \ | ||
| + | && rm -rf / | ||
| + | |||
| + | COPY web/ / | ||
| + | COPY locale.gen / | ||
| + | COPY ldap.conf / | ||
| + | COPY docker-config.inc.php / | ||
| + | </ | ||
| + | |||
| + | * zugehöriges '' | ||
| + | * zugehöriges '' | ||
| + | de_DE.UTF-8 UTF-8 | ||
| + | en_US.UTF-8 UTF-8 | ||
| + | </ | ||
| + | |||
| + | Fehlt natürlich noch komplett die LDAP-Konfiguration etc. Die kann man oben abschauen. | ||
| + | Zugehöriges docker-compose.yml könnte so aussehen: | ||
| + | |||
| + | < | ||
| + | service... etc. | ||
| + | |||
| + | mrbs-devel-db: | ||
| + | container_name: | ||
| + | restart: always | ||
| + | image: mariadb: | ||
| + | environment: | ||
| + | MYSQL_DATABASE: | ||
| + | MYSQL_USER: mrbsdbuser | ||
| + | MYSQL_PASSWORD: | ||
| + | MYSQL_ROOT_PASSWORD: | ||
| + | MARIADB_AUTO_UPGRADE: | ||
| + | volumes: | ||
| + | - ./ | ||
| + | mrbs-devel: | ||
| + | depends_on: | ||
| + | - mrbs-devel-db | ||
| + | container_name: | ||
| + | image: linuxmuster/ | ||
| + | build: | ||
| + | dockerfile: Dockerfile | ||
| + | context: ./ | ||
| + | restart: always | ||
| + | environment: | ||
| + | MRBS_DB_HOST: | ||
| + | MRBS_DB_PORT: | ||
| + | MRBS_DB_DATABASE: | ||
| + | MRBS_DB_USER: | ||
| + | MRBS_DB_PASSWORD: | ||
| + | MRBS_DB_NAME: | ||
| + | MRBS_TIMEZONE: | ||
| + | MYSQL_ROOT_PASSWORD: | ||
| + | | ||
| + | </ | ||
| + | dazu dann ein ' | ||