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 ===
|
||||
FROM node:20-alpine AS builder
|
||||
# ---------- BASE ----------
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copier les fichiers de dépendances pour profiter du cache Docker
|
||||
COPY package*.json ./
|
||||
|
||||
# Installer uniquement ce qu'il faut pour le build
|
||||
# ---------- INSTALL DEPS ----------
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci
|
||||
|
||||
# Copier tout le code
|
||||
# ---------- COPY SOURCE ----------
|
||||
COPY . .
|
||||
|
||||
# Build Next.js pour la production
|
||||
# ---------- BUILD (OBLIGATOIRE POUR next start) ----------
|
||||
RUN npm run build
|
||||
|
||||
# === Étape 2 : Runner léger ===
|
||||
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 ----------
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# Lancer le serveur Next.js
|
||||
CMD ["npm", "start"]
|
||||
# ---------- START ----------
|
||||
CMD ["npm", "run", "start"]
|
||||
+30
-7
@@ -1,4 +1,5 @@
|
||||
import type { Metadata, Viewport } from "next";
|
||||
import Script from "next/script";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ThemeProvider } from "./components/ThemeProvider";
|
||||
@@ -108,7 +109,7 @@ export const metadata: Metadata = {
|
||||
classification: "Utility, Productivity",
|
||||
};
|
||||
|
||||
// JSON-LD structured data
|
||||
// JSON-LD
|
||||
const jsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebApplication",
|
||||
@@ -168,7 +169,7 @@ const faqJsonLd = {
|
||||
name: "Puis-je utiliser plusieurs minuteurs en même temps ?",
|
||||
acceptedAnswer: {
|
||||
"@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 ?",
|
||||
acceptedAnswer: {
|
||||
"@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({
|
||||
children,
|
||||
}: Readonly<{
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
}) {
|
||||
return (
|
||||
<html lang="fr" dir="ltr" suppressHydrationWarning>
|
||||
<head>
|
||||
{/* JSON-LD */}
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
@@ -213,8 +215,28 @@ export default function RootLayout({
|
||||
/>
|
||||
<script
|
||||
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"
|
||||
@@ -222,6 +244,7 @@ export default function RootLayout({
|
||||
crossOrigin="anonymous"
|
||||
/>
|
||||
</head>
|
||||
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
@@ -229,4 +252,4 @@ export default function RootLayout({
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
}
|
||||
+21
-8
@@ -1,11 +1,24 @@
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
app:
|
||||
container_name: chrono-app
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./:/app
|
||||
- /app/node_modules
|
||||
- "${WEB_PORT:-3000}:3000"
|
||||
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
command: npm run dev
|
||||
- PORT=3000
|
||||
- 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"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "16.1.6",
|
||||
"next": "^16.2.4",
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@tailwindcss/postcss": "^4.2.4",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"autoprefixer": "^10.5.0",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "16.1.6",
|
||||
"tailwindcss": "^4",
|
||||
"typescript": "5.9.3"
|
||||
"postcss": "^8.5.10",
|
||||
"tailwindcss": "^4.2.4",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
const config = {
|
||||
plugins: {
|
||||
"@tailwindcss/postcss": {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
export default config;
|
||||
Reference in New Issue
Block a user