Fix language switche, adapt contact form and add gitea action.
This commit is contained in:
+6
-27
@@ -1,30 +1,9 @@
|
||||
FROM hugomods/hugo:latest
|
||||
FROM ghcr.io/gohugoio/hugo:v0.160.0 AS build
|
||||
|
||||
# Installe Node.js et npm
|
||||
USER root
|
||||
RUN apk add --no-cache nodejs npm git
|
||||
WORKDIR /project
|
||||
COPY . /project
|
||||
RUN hugo build --minify --cleanDestinationDir
|
||||
|
||||
WORKDIR /src
|
||||
FROM caddy:2-alpine
|
||||
|
||||
# Copie package.json et package-lock.json si présent
|
||||
COPY package.json ./
|
||||
|
||||
# Installation des dépendances
|
||||
RUN npm install --save-dev sass
|
||||
|
||||
# Copie le reste du code
|
||||
COPY . .
|
||||
|
||||
# Build CSS (tailwind + scss)
|
||||
RUN npm run build
|
||||
|
||||
|
||||
EXPOSE 1313 3001
|
||||
|
||||
CMD ["sh", "-c", "set -a; [ -f .env ] && . ./.env; set +a; BASE_URL=${BASE_URL:-http://localhost}; node contact-backend.js & hugo server -D --bind 0.0.0.0 --baseURL ${BASE_URL}:1313 --appendPort=false"]
|
||||
|
||||
# @TODO: Ajouter une étape de build pour générer les fichiers statiques de Hugo
|
||||
# gunzippé et optimisé pour la production
|
||||
# utilisé Nginx plutot que serveur
|
||||
# créer des étapes de build pour la compilation et la copie des fichier sur le serveur nginx
|
||||
# docker build -t hugo-site:latest .
|
||||
COPY --from=build /project/public/ /usr/share/caddy/
|
||||
|
||||
Reference in New Issue
Block a user