From a5aace56d254d16ee36cccd9426c3a7269616400 Mon Sep 17 00:00:00 2001 From: TheMaddax Date: Sat, 23 Nov 2024 18:06:18 -0600 Subject: [PATCH] Use package.json --- Dockerfile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index beabd8b..5c98640 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,20 +4,14 @@ ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} WORKDIR /app COPY package*.json ./ -# Install all dependencies including dev dependencies for types RUN npm install -RUN npm install -g typescript -# Install type definitions -RUN npm install --save-dev @types/react-dom @types/vite @vitejs/plugin-react COPY . . RUN npm run build -# Production stage remains the same +# Production stage FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD curl -f http://localhost/ || exit 1 -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] - +EXPOSE 80 \ No newline at end of file