Compare commits

..

7 Commits

Author SHA1 Message Date
sam 889902aa4f Merge pull request 'feat(tickets): suivi bidirectionnel des tickets utilisateur via Gitea' (#7) from feat/ci-cd-securisation-infcdaal3 into main
CI - Intégration continue / quality-and-tests (push) Successful in 3m26s
CD - Déploiement continu / deploy (push) Successful in 1m52s
Reviewed-on: #7
2026-07-08 21:40:09 +00:00
sam d452a9cfa3 Merge pull request 'docs(env): DB_HOST generique (serveur MySQL du reseau) dans le template prod' (#6) from feat/ci-cd-securisation-infcdaal3 into main
CI - Intégration continue / quality-and-tests (push) Successful in 3m26s
CD - Déploiement continu / deploy (push) Successful in 1m41s
Reviewed-on: #6
2026-07-08 20:55:36 +00:00
sam a5452624cb Merge pull request 'ci(deploy): genere vendor et assets sur l'hote (le bind-mount masque ceux de l'image)' (#5) from feat/ci-cd-securisation-infcdaal3 into main
CD - Déploiement continu / deploy (push) Successful in 1m40s
Reviewed-on: #5
2026-07-08 20:29:35 +00:00
sam e7623a8666 Merge pull request 'Feat/ci cd securisation infcdaal3' (#4) from feat/ci-cd-securisation-infcdaal3 into main
CI - Intégration continue / quality-and-tests (push) Successful in 3m21s
CD - Déploiement continu / deploy (push) Successful in 1m34s
Reviewed-on: #4
2026-07-08 19:21:19 +00:00
sam 9deb64b0f2 Merge pull request 'Feat/ci cd securisation infcdaal3' (#3) from feat/ci-cd-securisation-infcdaal3 into main
CD - Déploiement continu / deploy (push) Successful in 1m33s
CI - Intégration continue / quality-and-tests (push) Failing after 3m9s
Reviewed-on: #3
2026-07-08 19:14:43 +00:00
sam d70d60b96f Merge pull request 'Feat/ci cd securisation infcdaal3' (#2) from feat/ci-cd-securisation-infcdaal3 into main
CD - Déploiement continu / deploy (push) Successful in 1m33s
CI - Intégration continue / quality-and-tests (push) Failing after 2m39s
Reviewed-on: #2
2026-07-08 17:03:41 +00:00
sam 22bdf7307a Merge pull request 'Feat/ci cd securisation infcdaal3' (#1) from feat/ci-cd-securisation-infcdaal3 into main
CD - Déploiement Web (Production) / build-and-deploy (push) Failing after 39s
CI - Web (Laravel) / quality-and-tests (push) Failing after 3m59s
Reviewed-on: #1
2026-07-08 16:47:05 +00:00
15 changed files with 2 additions and 285 deletions
-1
View File
@@ -7,7 +7,6 @@ et le versionnage suit [SemVer](https://semver.org/lang/fr/).
## [Non publié] ## [Non publié]
### Ajouté ### Ajouté
- Page publique de téléchargement des applications mobiles Android / iOS (`/telecharger`).
- Système de tickets connecté à Gitea : création, suivi de l'avancement (état, jalon, labels), fil de discussion et réponses depuis l'interface web. - Système de tickets connecté à Gitea : création, suivi de l'avancement (état, jalon, labels), fil de discussion et réponses depuis l'interface web.
- Pipeline d'intégration continue Gitea Actions (tests, Pint, audit de sécurité). - Pipeline d'intégration continue Gitea Actions (tests, Pint, audit de sécurité).
- Pipeline de déploiement continu (build image → registre Gitea → webhook Portainer). - Pipeline de déploiement continu (build image → registre Gitea → webhook Portainer).
-6
View File
@@ -68,10 +68,4 @@ GITEA_URL=https://gitea.sam-coffre.duckdns.org
GITEA_TOKEN= GITEA_TOKEN=
GITEA_REPO=sam/cesizen GITEA_REPO=sam/cesizen
# --- Applications mobiles (page /telecharger) ---
MOBILE_ANDROID_URL=
MOBILE_IOS_URL=
MOBILE_ANDROID_VERSION=1.0.0
MOBILE_IOS_VERSION=1.0.0
VITE_APP_NAME="${APP_NAME}" VITE_APP_NAME="${APP_NAME}"
-7
View File
@@ -59,11 +59,4 @@ GITEA_URL=https://gitea.sam-coffre.duckdns.org
GITEA_TOKEN= # token Gitea avec le scope write:issue GITEA_TOKEN= # token Gitea avec le scope write:issue
GITEA_REPO=sam/cesizen GITEA_REPO=sam/cesizen
# ── Applications mobiles (page /telecharger) ─────────────────
# Liens de store (prioritaires) ou dépôt des binaires dans public/downloads/.
MOBILE_ANDROID_URL=
MOBILE_IOS_URL=
MOBILE_ANDROID_VERSION=1.0.0
MOBILE_IOS_VERSION=1.0.0
VITE_APP_NAME="${APP_NAME}" VITE_APP_NAME="${APP_NAME}"
-2
View File
@@ -18,8 +18,6 @@
/public/storage /public/storage
/storage/*.key /storage/*.key
/storage/pail /storage/pail
/public/downloads/*.apk
/public/downloads/*.ipa
/vendor /vendor
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
@@ -1,45 +0,0 @@
<?php
namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
class DownloadController extends Controller
{
// Page publique de téléchargement des applications mobiles
public function index()
{
return view('telecharger', [
'android' => $this->resoudre('android'),
'ios' => $this->resoudre('ios'),
]);
}
/**
* Détermine, pour une plateforme, le lien de téléchargement et sa disponibilité.
*
* @return array{version: string, url: string|null, disponible: bool}
*/
private function resoudre(string $plateforme): array
{
$config = config("mobile.{$plateforme}");
if (! is_array($config)) {
$config = [];
}
$version = is_string($config['version'] ?? null) ? $config['version'] : '1.0.0';
$url = (is_string($config['url'] ?? null) && $config['url'] !== '') ? $config['url'] : null;
$file = is_string($config['file'] ?? null) ? $config['file'] : null;
// À défaut d'URL explicite, on propose le fichier précompilé s'il existe.
if ($url === null && $file !== null && file_exists(public_path($file))) {
$url = asset($file);
}
return [
'version' => $version,
'url' => $url,
'disponible' => $url !== null,
];
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Applications mobiles (téléchargement)
|--------------------------------------------------------------------------
|
| Pour chaque plateforme, la page de téléchargement utilise en priorité
| l'URL fournie (lien de store OU URL directe). À défaut, elle propose le
| fichier précompilé déposé dans public/downloads/. Si aucun des deux n'est
| disponible, le bouton affiche « bientôt disponible ».
|
*/
'android' => [
'version' => env('MOBILE_ANDROID_VERSION', '1.0.0'),
'url' => env('MOBILE_ANDROID_URL'),
'file' => 'downloads/cesizen.apk',
],
'ios' => [
'version' => env('MOBILE_IOS_VERSION', '1.0.0'),
'url' => env('MOBILE_IOS_URL'),
'file' => 'downloads/cesizen.ipa',
],
];
+1 -28
View File
@@ -1,12 +1,9 @@
{ {
"name": "WEB", "name": "www",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"dependencies": {
"alpinejs": "^3.15.12"
},
"devDependencies": { "devDependencies": {
"@tailwindcss/vite": "^4.0.0", "@tailwindcss/vite": "^4.0.0",
"axios": "^1.11.0", "axios": "^1.11.0",
@@ -1137,30 +1134,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vue/reactivity": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz",
"integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==",
"license": "MIT",
"dependencies": {
"@vue/shared": "3.1.5"
}
},
"node_modules/@vue/shared": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz",
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==",
"license": "MIT"
},
"node_modules/alpinejs": {
"version": "3.15.12",
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.15.12.tgz",
"integrity": "sha512-nJvPAQVNPdZZ0NrExJ/kzQco3ijR8LwvCOadQecllESiqT4NyZ/57sN9V2XyvhlBGAbmlKYgeWZvYdKq99ij/Q==",
"license": "MIT",
"dependencies": {
"@vue/reactivity": "~3.1.1"
}
},
"node_modules/ansi-regex": { "node_modules/ansi-regex": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
-3
View File
@@ -13,8 +13,5 @@
"laravel-vite-plugin": "^2.0.0", "laravel-vite-plugin": "^2.0.0",
"tailwindcss": "^4.0.0", "tailwindcss": "^4.0.0",
"vite": "^7.0.7" "vite": "^7.0.7"
},
"dependencies": {
"alpinejs": "^3.15.12"
} }
} }
-25
View File
@@ -1,25 +0,0 @@
# Applications mobiles précompilées
Déposez ici les binaires servis par la page **/telecharger** :
- `cesizen.apk` — application Android
- `cesizen.ipa` — application Apple (iOS)
La page détecte automatiquement la présence de ces fichiers.
## Alternative : liens de store
Plutôt que des fichiers locaux, vous pouvez renseigner des liens (Play Store,
App Store, TestFlight…) dans le fichier `.env` du serveur :
```
MOBILE_ANDROID_URL=https://play.google.com/store/apps/details?id=...
MOBILE_IOS_URL=https://apps.apple.com/app/id...
MOBILE_ANDROID_VERSION=1.0.0
MOBILE_IOS_VERSION=1.0.0
```
Si une URL est renseignée, elle est prioritaire sur le fichier local.
Si ni URL ni fichier ne sont disponibles, le bouton affiche « Bientôt disponible ».
> Les binaires (`*.apk`, `*.ipa`) ne sont pas versionnés dans git (voir `.gitignore`).
-7
View File
@@ -1,8 +1 @@
import './bootstrap'; import './bootstrap';
// Alpine.js hébergé localement (bundle Vite) plutôt que via un CDN externe,
// pour rester compatible avec la Content-Security-Policy stricte.
import Alpine from 'alpinejs';
window.Alpine = Alpine;
Alpine.start();
@@ -6,6 +6,7 @@
<title>@yield('title', 'CESIZen') | Ministère de la Santé et de la Prévention</title> <title>@yield('title', 'CESIZen') | Ministère de la Santé et de la Prévention</title>
@vite(['resources/css/app.css', 'resources/js/app.js']) @vite(['resources/css/app.css', 'resources/js/app.js'])
<link rel="icon" href="./img/CesiZen_logo.png" type="image/x-icon"> <link rel="icon" href="./img/CesiZen_logo.png" type="image/x-icon">
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
<style> <style>
:root { :root {
--fr-blue: #000091; --fr-blue: #000091;
@@ -62,16 +62,6 @@
</a> </a>
@endauth @endauth
<!-- Télécharger l'application mobile (public) -->
<a href="{{ route('telecharger') }}"
class="flex items-center gap-4 px-4 py-3 rounded-sm transition-all group {{ request()->routeIs('telecharger') ? 'text-white bg-[#000091] font-bold shadow-md' : 'text-slate-700 hover:bg-slate-50 font-medium border-b border-slate-100/50' }}"
{!! request()->routeIs('telecharger') ? 'aria-current="page"' : '' !!}>
<div class="w-8 h-8 rounded-sm flex items-center justify-center transition-colors {{ request()->routeIs('telecharger') ? 'bg-white/20 text-white' : 'bg-slate-100 text-slate-700' }}" aria-hidden="true">
<x-heroicon-o-device-phone-mobile class="h-4 w-4" />
</div>
Application mobile
</a>
<div class="pt-10 space-y-1"> <div class="pt-10 space-y-1">
<p class="text-[10px] font-bold text-slate-500 uppercase tracking-[0.2em] mb-4 px-4">Services de l'État</p> <p class="text-[10px] font-bold text-slate-500 uppercase tracking-[0.2em] mb-4 px-4">Services de l'État</p>
<a href="#" class="flex items-center justify-between px-4 py-2 text-sm text-slate-600 hover:text-[--fr-blue] font-medium transition-colors"> <a href="#" class="flex items-center justify-between px-4 py-2 text-sm text-slate-600 hover:text-[--fr-blue] font-medium transition-colors">
-77
View File
@@ -1,77 +0,0 @@
@extends('layouts.app')
@section('title', "Télécharger l'application")
@section('content')
<div class="max-w-3xl mx-auto space-y-10">
<!-- En-tête -->
<div class="text-center">
<h1 class="text-3xl font-bold text-[#161616] mb-3">📱 Télécharger l'application CESIZen</h1>
<p class="text-slate-600 max-w-xl mx-auto">
Emportez CESIZen partout avec vous. Choisissez votre plateforme et installez
l'application mobile pour suivre votre bien-être au quotidien.
</p>
</div>
<div class="grid gap-6 md:grid-cols-2">
{{-- Carte Android --}}
<div class="bg-white border border-slate-200 p-8 flex flex-col items-center text-center shadow-sm">
<div class="w-16 h-16 rounded-2xl bg-green-50 flex items-center justify-center mb-4">
<span class="text-4xl">🤖</span>
</div>
<h2 class="text-2xl font-bold text-slate-900 mb-1">Android</h2>
<p class="text-sm text-slate-500 mb-6">Version {{ $android['version'] }}</p>
@if ($android['disponible'])
<a href="{{ $android['url'] }}"
@if (str_starts_with($android['url'], url('/'))) download @else target="_blank" rel="noopener" @endif
class="w-full px-6 py-3 bg-[#000091] text-white font-bold rounded-sm hover:bg-blue-800 shadow-md transition-all uppercase tracking-widest">
⬇️ Télécharger (.apk)
</a>
<p class="text-xs text-slate-400 mt-3">
Sur Android, autorisez l'installation depuis « sources inconnues » si nécessaire.
</p>
@else
<button type="button" disabled
class="w-full px-6 py-3 bg-slate-200 text-slate-500 font-bold rounded-sm cursor-not-allowed">
Bientôt disponible
</button>
@endif
</div>
{{-- Carte iOS --}}
<div class="bg-white border border-slate-200 p-8 flex flex-col items-center text-center shadow-sm">
<div class="w-16 h-16 rounded-2xl bg-slate-100 flex items-center justify-center mb-4">
<span class="text-4xl">🍏</span>
</div>
<h2 class="text-2xl font-bold text-slate-900 mb-1">Apple (iOS)</h2>
<p class="text-sm text-slate-500 mb-6">Version {{ $ios['version'] }}</p>
@if ($ios['disponible'])
<a href="{{ $ios['url'] }}"
@if (str_starts_with($ios['url'], url('/'))) download @else target="_blank" rel="noopener" @endif
class="w-full px-6 py-3 bg-slate-900 text-white font-bold rounded-sm hover:bg-black shadow-md transition-all uppercase tracking-widest">
⬇️ Télécharger
</a>
<p class="text-xs text-slate-400 mt-3">
L'installation d'un fichier .ipa nécessite TestFlight ou un profil adapté.
</p>
@else
<button type="button" disabled
class="w-full px-6 py-3 bg-slate-200 text-slate-500 font-bold rounded-sm cursor-not-allowed">
Bientôt disponible
</button>
@endif
</div>
</div>
<div class="text-center">
<a href="{{ route('home') }}" class="text-sm font-bold text-[--fr-blue] hover:underline">
Retour à l'accueil
</a>
</div>
</div>
@endsection
-4
View File
@@ -3,7 +3,6 @@
use App\Http\Controllers\DashboardController; use App\Http\Controllers\DashboardController;
use App\Http\Controllers\Web\AuthController; use App\Http\Controllers\Web\AuthController;
use App\Http\Controllers\Web\DiagnosticController; use App\Http\Controllers\Web\DiagnosticController;
use App\Http\Controllers\Web\DownloadController;
use App\Http\Controllers\Web\EmotionController; use App\Http\Controllers\Web\EmotionController;
use App\Http\Controllers\Web\InformationController; use App\Http\Controllers\Web\InformationController;
use App\Http\Controllers\Web\ProfileController; use App\Http\Controllers\Web\ProfileController;
@@ -18,9 +17,6 @@ Route::get('/relaxation', [RelaxationController::class, 'index'])->name('relaxat
Route::get('/informations', [InformationController::class, 'index'])->name('informations.index'); Route::get('/informations', [InformationController::class, 'index'])->name('informations.index');
Route::get('/informations/{id}', [InformationController::class, 'show'])->name('informations.show'); Route::get('/informations/{id}', [InformationController::class, 'show'])->name('informations.show');
// Téléchargement des applications mobiles (Android / iOS)
Route::get('/telecharger', [DownloadController::class, 'index'])->name('telecharger');
// Authentification // Authentification
Route::get('/login', [AuthController::class, 'showLogin'])->name('login'); Route::get('/login', [AuthController::class, 'showLogin'])->name('login');
Route::post('/login', [AuthController::class, 'login']); Route::post('/login', [AuthController::class, 'login']);
-41
View File
@@ -1,41 +0,0 @@
<?php
namespace Tests\Feature;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;
/**
* Page publique de téléchargement des applications mobiles.
*/
class DownloadTest extends TestCase
{
#[Test]
public function la_page_de_telechargement_est_publique()
{
$this->get('/telecharger')
->assertOk()
->assertSee('Android')
->assertSee('Apple');
}
#[Test]
public function un_lien_de_store_configure_est_propose()
{
config(['mobile.android.url' => 'https://play.google.com/store/apps/details?id=fr.cesizen']);
$this->get('/telecharger')
->assertOk()
->assertSee('play.google.com');
}
#[Test]
public function sans_lien_ni_fichier_le_bouton_est_desactive()
{
config(['mobile.ios.url' => null, 'mobile.ios.file' => 'downloads/inexistant.ipa']);
$this->get('/telecharger')
->assertOk()
->assertSee('Bientôt disponible');
}
}