diff --git a/README.md b/README.md index d1b5315..5c8852e 100644 --- a/README.md +++ b/README.md @@ -132,9 +132,33 @@ docker compose up -d --build ``` 3. Il container dovrebbe diventare disponibile su ``http://localhost:8080`` -### Per utenti Docker avanzati -Se sei un utente Docker avanzato e vuoi personalizzare puoi modificare la configurazione di docker nei file ``docker/php/config.php``, ``docker-compose.yml`` e ``Dockerfile`` per adattare tutto al tuo ambiente. -Per la maggior parte degli utenti consigliamo di usare la configurazione per Docker predefinita. +### Personalizzare l'istanza +Per cambiare le impostazioni dell'istanza basta aprire ``docker-compose.yml`` con un editor di testo e modificare le variabili d'ambiente: +```yaml + environment: + # --- Configuratione Database --- + DB_HOST: db # Host database + DB_USER: orario # Utente database + DB_PASS: orario # Password dell'utente del database + DB_NAME: school_timetable # Nome del database + + # --- Impostazioni sito --- + APP_NAME: "Orario Scuola" # Nome del sito + YEAR: "2025/26" # Anno scolastico corrente + API_URL: "" # URL della API per l'importazione, lascia vuoto per disabilitare + DEV_MODE: "false" # Abilita modalita' di sviluppo per output dettagliato. + + # --- Impostazioni Autenticazione --- + AUTH_TYPE: "local" # Tipo di autenticazione: può essere local o keycloak + APP_DOMAIN: "" # Dominio dell'app, ad esempio orario.tuosito.com + + # --- Impostazioni di Keycloak (solo se il tipo di autenticazione è Keycloak) --- + KEYCLOAK_DOMAIN: "" # Dominio di Keycloak, ad esempio sso.tuosito.com + KEYCLOAK_REALM: "" # Realm di Keycloak, ad esempio master + KEYCLOAK_CLIENT_ID: "" # Client ID per Keycloak, ad esempio orario + KEYCLOAK_CLIENT_SECRET: "" # Client Secret per Keycloak, ad esempio abcde12345 + KEYCLOAK_ALLOWED_USERS: '[]' # Nomi utente che possono accedere al pannello di controllo, lascia vuoto per consentire tutti gli utenti. Esempio: '["admin","prof","segreteria"]' +``` ## Segnalare un problema Per segnalare un problema puoi usare [Bugzilla](https://bugs.vichingo455.freeddns.org/describecomponents.cgi?product=Orario%20Scuola). Clicca [qui](https://bugs.vichingo455.freeddns.org/describecomponents.cgi?product=Orario%20Scuola) per andare a Bugzilla. diff --git a/docker-compose.yml b/docker-compose.yml index f1245a3..2599b36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,10 +15,10 @@ services: DB_NAME: school_timetable # Nome del database # --- Impostazioni sito --- - APP_NAME: "Orario Scuola" - YEAR: "2025/26" - API_URL: "" - DEV_MODE: "false" + APP_NAME: "Orario Scuola" # Nome del sito + YEAR: "2025/26" # Anno scolastico corrente + API_URL: "" # URL della API per l'importazione, lascia vuoto per disabilitare + DEV_MODE: "false" # Abilita modalita' di sviluppo per output dettagliato. # --- Impostazioni Autenticazione --- AUTH_TYPE: "local" # Tipo di autenticazione: può essere local o keycloak @@ -29,16 +29,16 @@ services: KEYCLOAK_REALM: "" # Realm di Keycloak, ad esempio master KEYCLOAK_CLIENT_ID: "" # Client ID per Keycloak, ad esempio orario KEYCLOAK_CLIENT_SECRET: "" # Client Secret per Keycloak, ad esempio abcde12345 - KEYCLOAK_ALLOWED_USERS: '["admin","prof","segreteria"]' + KEYCLOAK_ALLOWED_USERS: '[]' # Nomi utente che possono accedere al pannello di controllo, lascia vuoto per consentire tutti gli utenti. Esempio: '["admin","prof","segreteria"]' db: image: mariadb:11 container_name: orario-db restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD: P@ssw0rd - MYSQL_DATABASE: school_timetable - MYSQL_USER: orario - MYSQL_PASSWORD: orario + MYSQL_ROOT_PASSWORD: P@ssw0rd # Password dell'utente root del database + MYSQL_DATABASE: school_timetable # Nome del database, da impostare in DB_NAME + MYSQL_USER: orario # Utente del database, da impostare in DB_USER + MYSQL_PASSWORD: orario # Password del database, da impostare in DB_PASS volumes: - db_data:/var/lib/mysql - ./schema.sql:/docker-entrypoint-initdb.d/init.sql:ro diff --git a/docker/php/config.php b/docker/php/config.php index e8076dd..c3047b7 100644 --- a/docker/php/config.php +++ b/docker/php/config.php @@ -1,4 +1,20 @@ '); // Host del database (ad esempio localhost) diff --git a/htdocs/css/home.css b/htdocs/css/home.css index e590ec1..8482fc7 100644 --- a/htdocs/css/home.css +++ b/htdocs/css/home.css @@ -1,3 +1,19 @@ +/* +Orario Scuola, Copyright (C) 2025 EmmeV. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see https://www.gnu.org/licenses/. +*/ /* Base styles */ body { font-family: Arial, sans-serif; diff --git a/htdocs/css/navbar.css b/htdocs/css/navbar.css index 31da9dc..ad4017b 100644 --- a/htdocs/css/navbar.css +++ b/htdocs/css/navbar.css @@ -1,3 +1,19 @@ +/* +Orario Scuola, Copyright (C) 2025 EmmeV. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see https://www.gnu.org/licenses/. +*/ /* Navbar */ .navbar { background-color: #2c3e50; diff --git a/htdocs/css/timetable.css b/htdocs/css/timetable.css index f4003b1..6b3c3e9 100644 --- a/htdocs/css/timetable.css +++ b/htdocs/css/timetable.css @@ -1,3 +1,19 @@ +/* +Orario Scuola, Copyright (C) 2025 EmmeV. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see https://www.gnu.org/licenses/. +*/ /* Base styles */ body { font-family: Arial, sans-serif; diff --git a/htdocs/docenti.php b/htdocs/docenti.php index 5d0f392..a463a05 100644 --- a/htdocs/docenti.php +++ b/htdocs/docenti.php @@ -1,4 +1,20 @@ diff --git a/htdocs/laboratori.php b/htdocs/laboratori.php index 4f7e205..cc80544 100644 --- a/htdocs/laboratori.php +++ b/htdocs/laboratori.php @@ -1,4 +1,20 @@ query("SELECT * FROM classes WHERE id=$class_id")->fetch_assoc(); diff --git a/utils/generate_hash.php b/utils/generate_hash.php index fe4d037..2783920 100644 --- a/utils/generate_hash.php +++ b/utils/generate_hash.php @@ -1,9 +1,20 @@ 1) { $primoArgomento = $argv[1]; $password = password_hash($primoArgomento, PASSWORD_DEFAULT);