From b241e183ee3c103083a0a68cf4d45db183f2a892 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 26 Aug 2025 06:14:22 +0200 Subject: [PATCH] =?UTF-8?q?docker:=20d=C3=A9l=C3=A9guer=20Nginx=20=C3=A0?= =?UTF-8?q?=204NK=5Fnode;=20image=20artefacts=20(dist)=20uniquement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfa010c..b16e557 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile optimisé pour l'intégration dans 4NK_node +# Dockerfile: construction des artefacts (dist/) sans serveur — Nginx géré par 4NK_node FROM node:20-alpine AS builder WORKDIR /app @@ -34,31 +34,11 @@ RUN chmod +x ./scripts/setup-remote-deps.sh && npm run build_wasm # Build de l'application RUN npm run build -# Image de production -FROM nginx:alpine +# Stage artefacts uniquement (pas de serveur ici) +FROM alpine:3.19 AS dist +WORKDIR /opt/ihm_client +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/package*.json ./ -# Installation de Node.js pour les scripts de démarrage -RUN apk update && apk add --no-cache nodejs npm wget - -# Copie des fichiers buildés -COPY --from=builder /app/dist /usr/share/nginx/html -COPY --from=builder /app/package*.json /app/ - -# Copie de la configuration nginx -COPY nginx.conf /etc/nginx/conf.d/default.conf - -# Script de démarrage -COPY start-4nk-node.sh /start-4nk-node.sh -RUN chmod +x /start-4nk-node.sh - -# Exposition des ports -EXPOSE 80 3003 - -# Variables d'environnement pour 4NK_node -ENV SDK_RELAY_WS_URL=ws://sdk_relay_1:8090 -ENV SDK_RELAY_HTTP_URL=http://sdk_relay_1:8091 -ENV BITCOIN_RPC_URL=http://bitcoin:18443 -ENV BLINDBIT_URL=http://blindbit:8000 - -# Point d'entrée -CMD ["/start-4nk-node.sh"] +# Conteneur neutre (aucun port exposé, artefacts montables dans 4NK_node) +CMD ["sh", "-c", "echo 'dist prêt dans /opt/ihm_client/dist'; tail -f /dev/null"]