Update
This commit is contained in:
parent
1f26297bc8
commit
b8ec5a5dd3
1 changed files with 5 additions and 5 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -4,20 +4,20 @@ ARG NODE_ENV=production
|
|||
ENV NODE_ENV=${NODE_ENV}
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
# Install dependencies including TypeScript
|
||||
# Install all dependencies including dev dependencies for types
|
||||
RUN npm install
|
||||
# Install TypeScript globally
|
||||
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
|
||||
# Production stage remains the same
|
||||
FROM nginx:alpine
|
||||
# Add security headers and optimization configs
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
# Add healthcheck
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost/ || exit 1
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue