From e37df3a11661b63c6b4536ebd1dbea41e7f63a04 Mon Sep 17 00:00:00 2001 From: Franek Date: Sun, 9 Feb 2025 18:58:53 +0100 Subject: [PATCH] fix Dockerfile: attempt 1 --- Dockerfile | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f9f8b4..34f7d08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ -FROM node:lts AS build - -WORKDIR /build -COPY package.json package.json -COPY package-lock.json package-lock.json -RUN npm ci - -COPY public/ public -COPY src/ src +FROM node:lts AS node +WORKDIR /app +COPY package*.json . +RUN npm install --production +COPY . . RUN npm run build -FROM httpd:alpine -WORKDIR /var/www/html -COPY --from=build /build/build/ . -EXPOSE 80 \ No newline at end of file +FROM nginx:alpine +COPY --from=node /app/build /usr/share/nginx/html + +EXPOSE 80 443 \ No newline at end of file