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