From c56d43b0190b0e7ab115430e2b1afe05c4ef8601 Mon Sep 17 00:00:00 2001 From: Boris Waaub Date: Wed, 28 Jan 2026 17:16:22 +0100 Subject: [PATCH] =?UTF-8?q?refactor(docker):=20mise=20=C3=A0=20jour=20du?= =?UTF-8?q?=20Dockerfile=20pour=20utiliser=20hugomods/hugo=20et=20suppress?= =?UTF-8?q?ion=20de=20docker-compose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 23 +++++++++++++---------- docker-compose.yaml | 11 ----------- 2 files changed, 13 insertions(+), 21 deletions(-) delete mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile index f7652ba..1e9005e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,25 @@ -FROM node:20-alpine AS build +FROM hugomods/hugo:latest -# Dépendances système utiles (optionnel) -RUN apk add --no-cache git +# Installe Node.js et npm +USER root +RUN apk add --no-cache nodejs npm git -WORKDIR /app +WORKDIR /src # Copie package.json et package-lock.json si présent COPY package.json ./ COPY package-lock.json ./ -# Installation des dépendances -RUN npm install -# Copie du reste du code +# Installation des dépendances +RUN npm install --save-dev sass + +# Build CSS (tailwind + scss) +RUN npm run build + +# Copie le reste du code COPY . . -# Expose le port utilisé par hugo server EXPOSE 1313 -# Commande de démarrage -CMD ["npm", "run", "start"] +CMD ["hugo", "server", "-D", "--bind", "0.0.0.0", "--baseURL", "http://localhost:1313", "--appendPort=false"] diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 6363d49..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: '3.9' - -services: - front: - image: hugomods/hugo:latest - ports: - - "127.0.0.1:1313:1313" - volumes: - - ".:/src" - command: > - npm run dev