diff --git a/Dockerfile b/Dockerfile index 719041e..ab12d62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,3 @@ -FROM node:18-alpine - -WORKDIR /app - -COPY package.json . -RUN npm installFROM node:18-alpine as build - -WORKDIR /app - -# Copy package files and install dependencies -COPY package.json package-lock.json* ./ -RUN npm ci - -# Copy all files -COPY . . - -# Build the application -RUN npm run build - # Production stage FROM node:18-alpine as production @@ -32,13 +13,3 @@ EXPOSE 3000 # Use the -s flag to handle SPA routing CMD ["serve", "-s", "dist", "-l", "3000"] - -RUN npm install -g serve - -COPY . . -RUN npm run build - -EXPOSE 3000 - -# Serve the static files after building -CMD ["serve", "-s", "dist", "-l", "3000"] \ No newline at end of file