Loading docker/README.md +12 −86 Original line number Diff line number Diff line # OSCAR DOCKER (developpement) # OSCAR DOCKER Copie de travail utilisée pour le développement local ## Démo/Préprod ## Prérequis ### Installation/build > Testé sous Debian 12 "Booworm" / Ubuntu Suivez la [procédure d'installation en production](./PROD.md) - Docker version 28.0.2, build 0442a73 - Git version 2.39.5 ## Installation ```bash git clone https://git.unicaen.fr/open-source/oscar.git ``` > Disponible à partir de la version *Starling*, donc pensez à switcher de branche (Mars 2025) : > ```bash > git fetch && git checkout origin/starling > ``` Copier la configuration initiale ```bash # Copie des fichiers de config "Dockerisés" cp config/autoload/local.docker.php.dist config/autoload/local.php cp config/autoload/unicaen-app.local.php.docker.dist config/autoload/unicaen-app.local.php cp config/autoload/unicaen-auth.local.php.docker.dist config/autoload/unicaen-auth.local.php cp config/autoload/unicaen-signature.local.php.dist config/autoload/unicaen-signature.local.php ``` Puis le **.env** qui centralise toute la configuration : ```bash cp .env.dist .env ``` > La configuration de base dans le .env est fonctionnelle pour la version développement Initialisation des volumes : ```bash # script qui va créer les volumes par défaut basé sur la configuration # et copier les templates . compose-init.sh ``` On lance les containers + build ```bash # Build / up docker compose up --build ``` Une fois les containers lancés, on met à jour le modèle de données ```bash # Mise à jour du modèle docker compose exec app-php php vendor/bin/doctrine-module orm:schema-tool:update --complete --force ``` Si besoin on charge les données de base de la démo : ```bash . docker/docker-sync-demos-datas.sh ``` C'est fini Accès WEB : http://localhost:8888 (identifiant: administrateur, Mot de passe: administrateur) Accès BDD : localhost:6543 (Bdd: oscar_dev_db, oscar_dev_user/oscar_dev_pass) Accès Mailhog (voir les mails envoyés par L'application) : http://localhost:8025 Accès Kibana (Faire du dev sur Elasticsearch) : http://localhost:5601 ## Architecture Il y'a 8 containers : - **app-apache** : Version web (http://localhost:8888) - **app-posgres** : Base de donnée (Bdd: oscar_dev_db, Port: 6543, oscar_dev_user/oscar_dev_pass) - **app-elasticsearch** : L'index de recherche (Ports non-exposé) - **app-gearman** : Serveur de tâche (Ports non-exposé) - **app-worker** : Tâche de fond Oscar - **app-vite** : Serveur Vite (http://localhost:5173) - **app-kibana** : Kibana (http://localhost:5601) - **app-mailhog** : Un mail catcher (http://localhost:8025) - **app-php** : Le moteur PHP (utilisé pour déclencher les commandes PHP) ## Développement ### Installation ## Usage Suivez la procédure de production, puis dans le fichier **compose.yml**, décommentez les containers en fin de fichier : - mailhog - vite (Si développement UI) - kibana (Si développement sur Elasticsearch) ### Commandes de base Loading Loading @@ -131,7 +57,7 @@ Build de l'UI : docker compose exec app-vite yarn run build ``` Purger la BDD (Stopper l'application) Purger la BDD (Stopper l'application avant) ```bash # Le volume avec les données est créé par docker - donc droit SU requis Loading docker/compose-init.sh +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ fichiers=( "Feuille de temps (personne):$VOLUMES_TIMESHEET_PERSON_MONTH:./data/templates/timesheet_person_month.default.html.php" "Feuille de temps (période):$VOLUMES_TIMESHEET_PERIOD:./data/templates/timesheet_period.default.html.php" "Feuille de temps (synthèse):$VOLUMES_TIMESHEET_ACTIVITY_SYNTHESIS:./data/templates/timesheet_activity_synthesis.default.html.php" "Logo:$VOLUMES_TEMPLATES/logo.png:/data/templates/logo.example.png" "Logo:$VOLUMES_TEMPLATES/logo.png:./data/templates/logo.example.png" ) Loading Loading @@ -72,7 +72,7 @@ fichiers=( "$VOLUMES_CONFIG/oscar.yml:config/autoload/oscar.yml.dist" "$VOLUMES_CONFIG/unicaen-app.local.php:config/autoload/unicaen-app.local.php.docker-dist" "$VOLUMES_CONFIG/unicaen-auth.local.php:config/autoload/unicaen-auth.local.php.docker-dist" "$VOLUMES_CONFIG/unicaen-signature.local.php:config/autoload/unicaen-signature.local.php" "$VOLUMES_CONFIG/unicaen-signature.local.php:config/autoload/unicaen-signature.local.php.dist" ) echo "🔧 Fichiers de configuration..." Loading Loading
docker/README.md +12 −86 Original line number Diff line number Diff line # OSCAR DOCKER (developpement) # OSCAR DOCKER Copie de travail utilisée pour le développement local ## Démo/Préprod ## Prérequis ### Installation/build > Testé sous Debian 12 "Booworm" / Ubuntu Suivez la [procédure d'installation en production](./PROD.md) - Docker version 28.0.2, build 0442a73 - Git version 2.39.5 ## Installation ```bash git clone https://git.unicaen.fr/open-source/oscar.git ``` > Disponible à partir de la version *Starling*, donc pensez à switcher de branche (Mars 2025) : > ```bash > git fetch && git checkout origin/starling > ``` Copier la configuration initiale ```bash # Copie des fichiers de config "Dockerisés" cp config/autoload/local.docker.php.dist config/autoload/local.php cp config/autoload/unicaen-app.local.php.docker.dist config/autoload/unicaen-app.local.php cp config/autoload/unicaen-auth.local.php.docker.dist config/autoload/unicaen-auth.local.php cp config/autoload/unicaen-signature.local.php.dist config/autoload/unicaen-signature.local.php ``` Puis le **.env** qui centralise toute la configuration : ```bash cp .env.dist .env ``` > La configuration de base dans le .env est fonctionnelle pour la version développement Initialisation des volumes : ```bash # script qui va créer les volumes par défaut basé sur la configuration # et copier les templates . compose-init.sh ``` On lance les containers + build ```bash # Build / up docker compose up --build ``` Une fois les containers lancés, on met à jour le modèle de données ```bash # Mise à jour du modèle docker compose exec app-php php vendor/bin/doctrine-module orm:schema-tool:update --complete --force ``` Si besoin on charge les données de base de la démo : ```bash . docker/docker-sync-demos-datas.sh ``` C'est fini Accès WEB : http://localhost:8888 (identifiant: administrateur, Mot de passe: administrateur) Accès BDD : localhost:6543 (Bdd: oscar_dev_db, oscar_dev_user/oscar_dev_pass) Accès Mailhog (voir les mails envoyés par L'application) : http://localhost:8025 Accès Kibana (Faire du dev sur Elasticsearch) : http://localhost:5601 ## Architecture Il y'a 8 containers : - **app-apache** : Version web (http://localhost:8888) - **app-posgres** : Base de donnée (Bdd: oscar_dev_db, Port: 6543, oscar_dev_user/oscar_dev_pass) - **app-elasticsearch** : L'index de recherche (Ports non-exposé) - **app-gearman** : Serveur de tâche (Ports non-exposé) - **app-worker** : Tâche de fond Oscar - **app-vite** : Serveur Vite (http://localhost:5173) - **app-kibana** : Kibana (http://localhost:5601) - **app-mailhog** : Un mail catcher (http://localhost:8025) - **app-php** : Le moteur PHP (utilisé pour déclencher les commandes PHP) ## Développement ### Installation ## Usage Suivez la procédure de production, puis dans le fichier **compose.yml**, décommentez les containers en fin de fichier : - mailhog - vite (Si développement UI) - kibana (Si développement sur Elasticsearch) ### Commandes de base Loading Loading @@ -131,7 +57,7 @@ Build de l'UI : docker compose exec app-vite yarn run build ``` Purger la BDD (Stopper l'application) Purger la BDD (Stopper l'application avant) ```bash # Le volume avec les données est créé par docker - donc droit SU requis Loading
docker/compose-init.sh +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ fichiers=( "Feuille de temps (personne):$VOLUMES_TIMESHEET_PERSON_MONTH:./data/templates/timesheet_person_month.default.html.php" "Feuille de temps (période):$VOLUMES_TIMESHEET_PERIOD:./data/templates/timesheet_period.default.html.php" "Feuille de temps (synthèse):$VOLUMES_TIMESHEET_ACTIVITY_SYNTHESIS:./data/templates/timesheet_activity_synthesis.default.html.php" "Logo:$VOLUMES_TEMPLATES/logo.png:/data/templates/logo.example.png" "Logo:$VOLUMES_TEMPLATES/logo.png:./data/templates/logo.example.png" ) Loading Loading @@ -72,7 +72,7 @@ fichiers=( "$VOLUMES_CONFIG/oscar.yml:config/autoload/oscar.yml.dist" "$VOLUMES_CONFIG/unicaen-app.local.php:config/autoload/unicaen-app.local.php.docker-dist" "$VOLUMES_CONFIG/unicaen-auth.local.php:config/autoload/unicaen-auth.local.php.docker-dist" "$VOLUMES_CONFIG/unicaen-signature.local.php:config/autoload/unicaen-signature.local.php" "$VOLUMES_CONFIG/unicaen-signature.local.php:config/autoload/unicaen-signature.local.php.dist" ) echo "🔧 Fichiers de configuration..." Loading