diff --git a/Dockerfile b/Dockerfile index 18975c0..3471cd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,15 @@ COPY package*.json ./ RUN npm install COPY . . -RUN npm run dev +RUN npm run build + +# Production stage +FROM nginx:stable-alpine as production-stage +# Remove default nginx website +RUN rm -rf /usr/share/nginx/html/* +# Copy built files +COPY --from=build-stage /app/dist /usr/share/nginx/html +# Copy custom nginx configuration +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"]