From d1ad6e0f090c4985f138e6584f78918c249edda2 Mon Sep 17 00:00:00 2001 From: mouad bouras Date: Thu, 26 Mar 2026 18:20:25 -0400 Subject: [PATCH] fix build --- Dockerfile | 9 ++++++--- astro.config.mjs | 4 ++-- src/components/ui/hero.tsx | 14 +++++++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa7927e..0655619 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ -FROM node:lts AS runtime +FROM node:24-alpine AS runtime WORKDIR /app +COPY package*.json ./ +RUN npm ci COPY . . - -RUN npm install RUN npm run build +ENV NODE_ENV=production +ENV HOST=0.0.0.0 +ENV PORT=4321 EXPOSE 4321 CMD ["node", "./dist/server/entry.mjs"] \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index 7dbbbe5..8286257 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,8 +5,8 @@ import react from '@astrojs/react'; import node from '@astrojs/node'; export default defineConfig({ - output: 'static', - adapter: node({ mode: 'middleware' }), + output: 'server', + adapter: node({ mode: 'standalone' }), site: 'https://cachetdeco.com', i18n: { defaultLocale: 'fr', diff --git a/src/components/ui/hero.tsx b/src/components/ui/hero.tsx index 4a2c1e7..0bf0c1f 100644 --- a/src/components/ui/hero.tsx +++ b/src/components/ui/hero.tsx @@ -116,9 +116,9 @@ export default function Hero({ content }: { content: HeroContent }) { @@ -127,7 +127,7 @@ export default function Hero({ content }: { content: HeroContent }) {