docker port change sql
This commit is contained in:
@ -1,28 +1,17 @@
|
|||||||
# Stage 1: Build Angular application
|
# Stage 1: Build Angular application
|
||||||
FROM node:18-alpine AS builder
|
FROM node:18-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# Install dependencies with legacy peer deps flag
|
|
||||||
RUN npm ci --legacy-peer-deps
|
RUN npm ci --legacy-peer-deps
|
||||||
|
|
||||||
# Copy source code
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build for production
|
# Development build (much faster - 2-3 minutes)
|
||||||
RUN npm run build -- --configuration production --progress=true
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Serve with Nginx
|
# Stage 2: Serve with Nginx
|
||||||
FROM nginx:alpine AS production
|
FROM nginx:alpine AS production
|
||||||
|
|
||||||
# Copy built artifacts from builder
|
|
||||||
COPY --from=builder /app/dist/fuse-angular /usr/share/nginx/html
|
COPY --from=builder /app/dist/fuse-angular /usr/share/nginx/html
|
||||||
|
|
||||||
# Expose port 80
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Run nginx
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Reference in New Issue
Block a user