Some checks failed
Build / Build and Push Docker Images (worker) (push) Waiting to run
Deploy Staging / Deploy to Staging (push) Waiting to run
Lint / Lint Code (push) Has been cancelled
Security / Security Scanning (push) Has been cancelled
Build / Build and Push Docker Images (api) (push) Has started running
Build / Build and Push Docker Images (chat) (push) Has started running
Build / Build and Push Docker Images (frontend) (push) Has started running
Test / Run Tests (push) Has been cancelled
BREAKING CHANGE: Monolithic ci.yml split into focused pipeline files ## Pipeline Reorganization Split single CI/CD pipeline into 7 specialized workflows: 1. **lint.yml** - Code quality checks (Black, Ruff, MyPy) 2. **test.yml** - Test suite with coverage reporting 3. **security.yml** - Security scanning (Bandit) 4. **build.yml** - Docker image builds and registry push 5. **deploy-staging.yml** - Staging environment deployment 6. **deploy-production.yml** - Production deployment (tags only) 7. **docs-generation.yml** - Scheduled documentation generation ## Benefits - **Modularity**: Each pipeline has single responsibility - **Performance**: Workflows run independently, faster feedback - **Clarity**: Easier to understand and maintain - **Flexibility**: Trigger pipelines independently - **Debugging**: Isolated failures easier to diagnose ## Dockerfile Improvements - Fix FROM AS casing (was 'as', now 'AS') in all Dockerfiles - Resolves Docker build warnings - Improves consistency across build files ## Documentation - Added .gitea/workflows/README.md with: - Workflow descriptions and triggers - Dependency diagram - Environment variables reference - Troubleshooting guide - Best practices ## Migration Notes - Old monolithic pipeline backed up as ci.yml.old - All triggers preserved from original pipeline - No changes to build or deploy logic - Same environment variables and secrets required 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
925 B
Docker
42 lines
925 B
Docker
# Dockerfile for React Frontend
|
|
# Build stage
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy package files
|
|
COPY frontend/package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy frontend source code
|
|
COPY frontend/src ./src
|
|
COPY frontend/index.html ./
|
|
COPY frontend/vite.config.js ./
|
|
|
|
# Build the frontend
|
|
RUN npm run build
|
|
|
|
# Production stage with nginx
|
|
FROM nginx:alpine
|
|
|
|
LABEL maintainer="automation-team@company.com"
|
|
LABEL description="Datacenter Documentation Frontend"
|
|
|
|
# Copy built assets from builder
|
|
COPY --from=builder /build/dist /usr/share/nginx/html
|
|
|
|
# Copy nginx configuration
|
|
COPY deploy/docker/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Expose port
|
|
EXPOSE 80
|
|
|
|
# Health check (use curl which is available in nginx:alpine)
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD curl -f http://127.0.0.1/health || exit 1
|
|
|
|
# Run nginx
|
|
CMD ["nginx", "-g", "daemon off;"]
|