From 58b9df92c077ede581f4fb16b2fed46fe8bae23e Mon Sep 17 00:00:00 2001 From: Boris Waaub Date: Mon, 16 Mar 2026 16:30:04 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Am=C3=A9liorer=20la=20gestion=20des=20v?= =?UTF-8?q?ariables=20d'environnement=20dans=20les=20scripts=20de=20d?= =?UTF-8?q?=C3=A9marrage=20et=20de=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- package.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 94b04d0..e9824ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ RUN npm run build EXPOSE 1313 3001 -CMD ["sh", "-c", "BASE_URL=${BASE_URL:-http://localhost}; node contact-backend.js & hugo server -D --bind 0.0.0.0 --baseURL ${BASE_URL}:1313 --appendPort=false"] +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 diff --git a/package.json b/package.json index 8ef3d4e..a4fe013 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "scripts": { "scss": "sass --watch assets/scss/custom.scss:static/css/custom.css", "scss-build": "sass assets/scss/custom.scss:static/css/custom.css", - "start": "concurrently \"npx tailwindcss -i themes/chill-theme/assets/css/main.css -o static/css/style.css --watch\" \"npm run scss -- --watch\" \"hugo server -D\"", - "build": "tailwindcss -i themes/chill-theme/assets/css/main.css -o static/css/style.css --minify && npm run scss-build && hugo --minify" + "start": "concurrently \"npx tailwindcss -i themes/chill-theme/assets/css/main.css -o static/css/style.css --watch\" \"npm run scss -- --watch\" \"sh -c 'set -a; [ -f .env ] && . ./.env; set +a; hugo server -D'\"", + "build": "tailwindcss -i themes/chill-theme/assets/css/main.css -o static/css/style.css --minify && npm run scss-build && sh -c 'set -a; [ -f .env ] && . ./.env; set +a; hugo --minify'" }, "devDependencies": { "@tailwindcss/forms": "^0.5.7", @@ -26,4 +26,4 @@ "multer": "^2.0.2", "nodemailer": "^8.0.1" } -} +} \ No newline at end of file