mirror of
https://github.com/arthur-pbty/chrono.git
synced 2026-06-03 15:07:21 +02:00
chore: update dependencies and add postcss configuration
- Updated Next.js to version 16.2.4 - Updated Tailwind CSS and PostCSS to their latest versions - Added autoprefixer to PostCSS configuration - Created a .dockerignore file to exclude unnecessary files from Docker context
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
node_modules
|
||||||
|
.next
|
||||||
|
.git
|
||||||
|
.env*
|
||||||
|
Dockerfile*
|
||||||
|
docker-compose*
|
||||||
+11
-22
@@ -1,34 +1,23 @@
|
|||||||
# === Étape 1 : Build ===
|
# ---------- BASE ----------
|
||||||
FROM node:20-alpine AS builder
|
FROM node:20-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copier les fichiers de dépendances pour profiter du cache Docker
|
# ---------- INSTALL DEPS ----------
|
||||||
COPY package*.json ./
|
COPY package.json package-lock.json* ./
|
||||||
|
|
||||||
# Installer uniquement ce qu'il faut pour le build
|
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
# Copier tout le code
|
# ---------- COPY SOURCE ----------
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build Next.js pour la production
|
# ---------- BUILD (OBLIGATOIRE POUR next start) ----------
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# === Étape 2 : Runner léger ===
|
# ---------- ENV ----------
|
||||||
FROM node:20-alpine AS runner
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copier uniquement ce qui est nécessaire pour la prod
|
|
||||||
COPY --from=builder /app/package*.json ./
|
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
|
||||||
COPY --from=builder /app/.next ./.next
|
|
||||||
COPY --from=builder /app/public ./public
|
|
||||||
|
|
||||||
# Mode production
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
ENV PORT=3000
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Lancer le serveur Next.js
|
# ---------- START ----------
|
||||||
CMD ["npm", "start"]
|
CMD ["npm", "run", "start"]
|
||||||
+30
-7
@@ -1,4 +1,5 @@
|
|||||||
import type { Metadata, Viewport } from "next";
|
import type { Metadata, Viewport } from "next";
|
||||||
|
import Script from "next/script";
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import { ThemeProvider } from "./components/ThemeProvider";
|
import { ThemeProvider } from "./components/ThemeProvider";
|
||||||
@@ -108,7 +109,7 @@ export const metadata: Metadata = {
|
|||||||
classification: "Utility, Productivity",
|
classification: "Utility, Productivity",
|
||||||
};
|
};
|
||||||
|
|
||||||
// JSON-LD structured data
|
// JSON-LD
|
||||||
const jsonLd = {
|
const jsonLd = {
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "WebApplication",
|
"@type": "WebApplication",
|
||||||
@@ -168,7 +169,7 @@ const faqJsonLd = {
|
|||||||
name: "Puis-je utiliser plusieurs minuteurs en même temps ?",
|
name: "Puis-je utiliser plusieurs minuteurs en même temps ?",
|
||||||
acceptedAnswer: {
|
acceptedAnswer: {
|
||||||
"@type": "Answer",
|
"@type": "Answer",
|
||||||
text: "Oui, vous pouvez créer et exécuter autant de minuteurs simultanés que vous le souhaitez. Chaque minuteur fonctionne de manière indépendante avec son propre compte à rebours.",
|
text: "Oui, vous pouvez créer et exécuter autant de minuteurs simultanés que vous le souhaitez.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -176,7 +177,7 @@ const faqJsonLd = {
|
|||||||
name: "Le chronomètre fonctionne-t-il en arrière-plan ?",
|
name: "Le chronomètre fonctionne-t-il en arrière-plan ?",
|
||||||
acceptedAnswer: {
|
acceptedAnswer: {
|
||||||
"@type": "Answer",
|
"@type": "Answer",
|
||||||
text: "Oui, le chronomètre et les minuteurs continuent de fonctionner même si vous changez d'onglet ou réduisez la fenêtre. Le temps est sauvegardé automatiquement.",
|
text: "Oui, il continue même si vous changez d'onglet.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -197,12 +198,13 @@ const breadcrumbJsonLd = {
|
|||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: Readonly<{
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}>) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<html lang="fr" dir="ltr" suppressHydrationWarning>
|
<html lang="fr" dir="ltr" suppressHydrationWarning>
|
||||||
<head>
|
<head>
|
||||||
|
{/* JSON-LD */}
|
||||||
<script
|
<script
|
||||||
type="application/ld+json"
|
type="application/ld+json"
|
||||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||||
@@ -213,8 +215,28 @@ export default function RootLayout({
|
|||||||
/>
|
/>
|
||||||
<script
|
<script
|
||||||
type="application/ld+json"
|
type="application/ld+json"
|
||||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(breadcrumbJsonLd) }}
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: JSON.stringify(breadcrumbJsonLd),
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{/* Matomo */}
|
||||||
|
<Script id="matomo" strategy="afterInteractive">
|
||||||
|
{`
|
||||||
|
var _paq = window._paq = window._paq || [];
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="https://analytics.arthurp.fr/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '4']);
|
||||||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
|
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
`}
|
||||||
|
</Script>
|
||||||
|
|
||||||
|
{/* perf */}
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link
|
<link
|
||||||
rel="preconnect"
|
rel="preconnect"
|
||||||
@@ -222,6 +244,7 @@ export default function RootLayout({
|
|||||||
crossOrigin="anonymous"
|
crossOrigin="anonymous"
|
||||||
/>
|
/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body
|
<body
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||||
>
|
>
|
||||||
@@ -229,4 +252,4 @@ export default function RootLayout({
|
|||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
+21
-8
@@ -1,11 +1,24 @@
|
|||||||
services:
|
services:
|
||||||
web:
|
app:
|
||||||
build: .
|
container_name: chrono-app
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "${WEB_PORT:-3000}:3000"
|
||||||
volumes:
|
|
||||||
- ./:/app
|
|
||||||
- /app/node_modules
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=development
|
- PORT=3000
|
||||||
command: npm run dev
|
- HOSTNAME=0.0.0.0
|
||||||
|
|
||||||
|
networks:
|
||||||
|
- app
|
||||||
|
|
||||||
|
networks:
|
||||||
|
app:
|
||||||
|
driver: bridge
|
||||||
Generated
+469
-404
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -9,18 +9,20 @@
|
|||||||
"lint": "eslint"
|
"lint": "eslint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "16.1.6",
|
"next": "^16.2.4",
|
||||||
"react": "19.2.3",
|
"react": "19.2.3",
|
||||||
"react-dom": "19.2.3"
|
"react-dom": "19.2.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/postcss": "^4",
|
"@tailwindcss/postcss": "^4.2.4",
|
||||||
"@types/node": "^20",
|
"@types/node": "^20",
|
||||||
"@types/react": "^19",
|
"@types/react": "^19",
|
||||||
"@types/react-dom": "^19",
|
"@types/react-dom": "^19",
|
||||||
|
"autoprefixer": "^10.5.0",
|
||||||
"eslint": "^9",
|
"eslint": "^9",
|
||||||
"eslint-config-next": "16.1.6",
|
"eslint-config-next": "16.1.6",
|
||||||
"tailwindcss": "^4",
|
"postcss": "^8.5.10",
|
||||||
"typescript": "5.9.3"
|
"tailwindcss": "^4.2.4",
|
||||||
|
"typescript": "^5.9.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
const config = {
|
const config = {
|
||||||
plugins: {
|
plugins: {
|
||||||
"@tailwindcss/postcss": {},
|
"@tailwindcss/postcss": {},
|
||||||
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
Reference in New Issue
Block a user