From 8e613345aa8c1dd109624faaf1ac311d8570736a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zombori=20P=C3=A9ter?= Date: Mon, 17 Nov 2025 15:19:16 +0100 Subject: [PATCH] =?UTF-8?q?Dockerfile=20=C3=BAjraindul=C3=A1s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 48cc7b6..8f764aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,16 @@ FROM node:20-alpine WORKDIR /usr/src/app +# 1) Csak a package fájlokat másoljuk és installálunk COPY package*.json ./ +RUN npm install --omit=dev -RUN npm install +# 2) A teljes kód +COPY . . +# 3) Alap port beállítás (K8s-ben felülírjuk APP_PORT-tal, ha akarjuk) +ENV APP_PORT=3000 EXPOSE 3000 -# A belépési parancsot a compose adja \ No newline at end of file +# 4) Indítsa el az API-t +CMD ["node", "api.js"] \ No newline at end of file