Merge pull request 'release/0.1.2' (#22) from release/0.1.2 into main
Reviewed-on: #22
This commit is contained in:
commit
c0375db9f2
10 changed files with 47 additions and 4 deletions
|
|
@ -4,6 +4,14 @@ Toutes les évolutions notables de NerdWare. Format basé sur
|
||||||
[Keep a Changelog](https://keepachangelog.com/fr/1.1.0/), versionné en
|
[Keep a Changelog](https://keepachangelog.com/fr/1.1.0/), versionné en
|
||||||
[SemVer](https://semver.org/lang/fr/).
|
[SemVer](https://semver.org/lang/fr/).
|
||||||
|
|
||||||
|
## [0.1.2] — 2026-06-12
|
||||||
|
|
||||||
|
### Ajouté
|
||||||
|
|
||||||
|
- **Umami analytics** (optionnel) : suivi d'audience injecté seulement si
|
||||||
|
`VITE_UMAMI_SRC` + `VITE_UMAMI_WEBSITE_ID` sont définis au build (sinon désactivé,
|
||||||
|
pas de suivi en dev). L'ID de site est public, pas un secret.
|
||||||
|
|
||||||
## [0.1.1] — 2026-06-12
|
## [0.1.1] — 2026-06-12
|
||||||
|
|
||||||
Correctifs et améliorations issus des premières parties entre amis.
|
Correctifs et améliorations issus des premières parties entre amis.
|
||||||
|
|
@ -55,5 +63,6 @@ fin), trois modes, back-office et internationalisation.
|
||||||
- **Déploiement** : Dockerfiles (serveur Bun, client nginx) + `docker-compose.prod.yml`
|
- **Déploiement** : Dockerfiles (serveur Bun, client nginx) + `docker-compose.prod.yml`
|
||||||
prêt pour Dokploy.
|
prêt pour Dokploy.
|
||||||
|
|
||||||
|
[0.1.2]: https://git.ayoubbenziza.dev/ayoub/nerdware/src/tag/v0.1.2
|
||||||
[0.1.1]: https://git.ayoubbenziza.dev/ayoub/nerdware/src/tag/v0.1.1
|
[0.1.1]: https://git.ayoubbenziza.dev/ayoub/nerdware/src/tag/v0.1.1
|
||||||
[0.1.0]: https://git.ayoubbenziza.dev/ayoub/nerdware/src/tag/v0.1.0
|
[0.1.0]: https://git.ayoubbenziza.dev/ayoub/nerdware/src/tag/v0.1.0
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@nerdware/server",
|
"name": "@nerdware/server",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
|
|
@ -1 +1,5 @@
|
||||||
VITE_SERVER_URL=http://localhost:3001
|
VITE_SERVER_URL=http://localhost:3001
|
||||||
|
|
||||||
|
# Umami analytics (optionnel, prod). Vide en dev = pas de suivi.
|
||||||
|
VITE_UMAMI_SRC=
|
||||||
|
VITE_UMAMI_WEBSITE_ID=
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,11 @@ COPY apps/web apps/web
|
||||||
|
|
||||||
ARG VITE_SERVER_URL
|
ARG VITE_SERVER_URL
|
||||||
ENV VITE_SERVER_URL=$VITE_SERVER_URL
|
ENV VITE_SERVER_URL=$VITE_SERVER_URL
|
||||||
|
# Umami analytics (optionnel) — figé au build.
|
||||||
|
ARG VITE_UMAMI_SRC
|
||||||
|
ENV VITE_UMAMI_SRC=$VITE_UMAMI_SRC
|
||||||
|
ARG VITE_UMAMI_WEBSITE_ID
|
||||||
|
ENV VITE_UMAMI_WEBSITE_ID=$VITE_UMAMI_WEBSITE_ID
|
||||||
RUN bun run --filter web build
|
RUN bun run --filter web build
|
||||||
|
|
||||||
FROM nginx:1.27-alpine AS runner
|
FROM nginx:1.27-alpine AS runner
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
20
apps/web/src/lib/analytics.ts
Normal file
20
apps/web/src/lib/analytics.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
// Umami analytics : on injecte le script seulement si les variables de build
|
||||||
|
// sont présentes (donc pas en dev → pas de trafic local dans les stats).
|
||||||
|
// L'ID de site est public (visible dans le HTML), ce n'est pas un secret.
|
||||||
|
|
||||||
|
const SRC = import.meta.env.VITE_UMAMI_SRC
|
||||||
|
const WEBSITE_ID = import.meta.env.VITE_UMAMI_WEBSITE_ID
|
||||||
|
|
||||||
|
export function initAnalytics(): void {
|
||||||
|
if (!SRC || !WEBSITE_ID) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (document.querySelector("script[data-website-id]")) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const script = document.createElement("script")
|
||||||
|
script.defer = true
|
||||||
|
script.src = SRC
|
||||||
|
script.setAttribute("data-website-id", WEBSITE_ID)
|
||||||
|
document.head.appendChild(script)
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,9 @@ import "@workspace/ui/globals.css"
|
||||||
import { App } from "./App.tsx"
|
import { App } from "./App.tsx"
|
||||||
import { ThemeProvider } from "@/components/theme-provider.tsx"
|
import { ThemeProvider } from "@/components/theme-provider.tsx"
|
||||||
import { I18nProvider } from "@/i18n/provider"
|
import { I18nProvider } from "@/i18n/provider"
|
||||||
|
import { initAnalytics } from "@/lib/analytics"
|
||||||
|
|
||||||
|
initAnalytics()
|
||||||
|
|
||||||
const queryClient = new QueryClient()
|
const queryClient = new QueryClient()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ services:
|
||||||
dockerfile: apps/web/Dockerfile
|
dockerfile: apps/web/Dockerfile
|
||||||
args:
|
args:
|
||||||
VITE_SERVER_URL: ${VITE_SERVER_URL}
|
VITE_SERVER_URL: ${VITE_SERVER_URL}
|
||||||
|
VITE_UMAMI_SRC: ${VITE_UMAMI_SRC:-}
|
||||||
|
VITE_UMAMI_WEBSITE_ID: ${VITE_UMAMI_WEBSITE_ID:-}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- server
|
- server
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "nerdware",
|
"name": "nerdware",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo build",
|
"build": "turbo build",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@nerdware/shared",
|
"name": "@nerdware/shared",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue