Files
apartment-dashboard/Dockerfile
Stephen Minakian de08b3ddfa
Some checks failed
CI/CD Pipeline - Apartment Dashboard / Run Linter (push) Failing after 4m52s
CI/CD Pipeline - Apartment Dashboard / Build & Push Image (push) Has been skipped
CI/CD Pipeline - Apartment Dashboard / Deploy to Production (push) Has been skipped
Add CI/CD pipeline with Harbor registry and SSH deployment
- Replace local deployment with proper CI/CD pipeline
- Add lint job as first stage (fail-fast)
- Build and push Docker image to Harbor registry
- Deploy via SSH with image tag from commit SHA
- Add deployment verification with health check
- Update Dockerfile to Node 20 and fix npm ci
- Support IMAGE variable in docker-compose for deployments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 16:59:51 -07:00

29 lines
492 B
Docker

# Build stage
FROM node:20-alpine as build
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (including devDependencies needed for build)
RUN npm ci
# Copy source code
COPY . .
# Build the app
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built app to nginx
COPY --from=build /app/dist /usr/share/nginx/html
# Copy custom nginx config (optional)
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]