From 43f7c3fae3a0df7063cde9f5de5bb857e6b0e6b3 Mon Sep 17 00:00:00 2001 From: saturneric Date: Sat, 5 Jul 2025 19:38:38 +0200 Subject: refactor(docker): improve Dockerfile structure and nginx configuration * Added missing line breaks for better readability. * Changed the nginx configuration path to use `ADD` instead of `COPY`. * Updated the exposed port from `8080` to `80/tcp` for standardization. --- Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c29cda7..034c64a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,20 @@ FROM node:lts-alpine AS build + WORKDIR /app + COPY package*.json ./ + RUN npm install + COPY . . + RUN npm run build FROM nginx:alpine AS runtime -COPY ./nginx/nginx.conf /etc/nginx/nginx.conf + +WORKDIR /usr/share/nginx/html + COPY --from=build /app/dist /usr/share/nginx/html -EXPOSE 8080 \ No newline at end of file +ADD nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80/tcp \ No newline at end of file -- cgit v1.2.3