Remove vite
This commit is contained in:
parent
afe29ad910
commit
42471336cf
1 changed files with 13 additions and 4 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -1,23 +1,32 @@
|
|||
# Build stage
|
||||
FROM --platform=linux/amd64 node:20-alpine as build
|
||||
ARG NODE_ENV=production
|
||||
ENV NODE_ENV=${NODE_ENV}
|
||||
WORKDIR /app
|
||||
|
||||
# Essential build dependencies
|
||||
# System dependencies with enhanced build tools
|
||||
RUN apk add --no-cache python3 make g++ curl git libc6-compat
|
||||
|
||||
# Clean and prepare npm
|
||||
RUN npm cache clean --force
|
||||
RUN npm install -g npm@latest
|
||||
|
||||
# Install dependencies from package.json
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm install -g typescript
|
||||
|
||||
# Build production assets
|
||||
# Copy source code and build
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Production stage
|
||||
# Production stage with Nginx
|
||||
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;"]
|
||||
Loading…
Add table
Reference in a new issue