Files
HIS/Dockerfile
m.imanpour 3d96371492
Some checks failed
Build and Deploy Angular App (Artifacts, Gitea-safe) / build (push) Failing after 13s
Build and Deploy Angular App (Artifacts, Gitea-safe) / scan (push) Has been skipped
Build and Deploy Angular App (Artifacts, Gitea-safe) / deploy (push) Has been skipped
directory structure built
2025-12-10 00:58:05 +03:30

30 lines
651 B
Docker

# ===== Stage 1: Build the Angular app =====
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files for caching
COPY package*.json ./
RUN npm ci
# Copy source code
COPY . .
# Build for production
RUN npm run build -- --configuration production
# ===== Stage 2: Serve static files with Nginx (app service) =====
FROM nginx:alpine
# Remove default Nginx files
RUN rm -rf /usr/share/nginx/html/*
# Copy built Angular app
COPY --from=builder /app/dist/niayesh-hospital /usr/share/nginx/html
# Copy app-specific Nginx config for SPA routing
COPY nginx_app.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]