Some checks are pending
CI Pipeline / changes (push) Waiting to run
CI Pipeline / core (push) Blocked by required conditions
CI Pipeline / trading-backend (push) Blocked by required conditions
CI Pipeline / trading-data-service (push) Blocked by required conditions
CI Pipeline / trading-frontend (push) Blocked by required conditions
CI Pipeline / erp-core (push) Blocked by required conditions
CI Pipeline / erp-mecanicas (push) Blocked by required conditions
CI Pipeline / gamilit-backend (push) Blocked by required conditions
CI Pipeline / gamilit-frontend (push) Blocked by required conditions
Core: - Add catalog reference implementations (auth, payments, notifications, websocket, etc.) - New agent profiles: Database Auditor, Integration Validator, LLM Agent, Policy Auditor, Trading Strategist - Update SIMCO directives and add escalation/git guidelines - Add deployment inventory and audit execution reports Projects: - erp-suite: DevOps configs, Dockerfiles, shared libs, vertical enhancements - gamilit: Test structure, admin controllers, service refactoring, husky/commitlint - trading-platform: MT4 gateway, auth controllers, admin frontend, deployment scripts - platform_marketing_content: Full DevOps setup, tests, Docker configs - betting-analytics/inmobiliaria-analytics: Initial app structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
85 lines
2.2 KiB
Docker
85 lines
2.2 KiB
Docker
# =============================================================================
|
|
# Dockerfile - Backend API
|
|
# ERP Construccion - Node.js + Express + TypeScript
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Stage 1: Base
|
|
# -----------------------------------------------------------------------------
|
|
FROM node:20-alpine AS base
|
|
|
|
# Install dependencies for native modules
|
|
RUN apk add --no-cache \
|
|
python3 \
|
|
make \
|
|
g++ \
|
|
curl
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Stage 2: Development
|
|
# -----------------------------------------------------------------------------
|
|
FROM base AS development
|
|
|
|
# Install all dependencies (including devDependencies)
|
|
RUN npm ci
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Expose port (standard: 3021 for construccion backend)
|
|
EXPOSE 3021
|
|
|
|
# Development command with hot reload
|
|
CMD ["npm", "run", "dev"]
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Stage 3: Builder
|
|
# -----------------------------------------------------------------------------
|
|
FROM base AS builder
|
|
|
|
# Install all dependencies
|
|
RUN npm ci
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build TypeScript
|
|
RUN npm run build
|
|
|
|
# Prune devDependencies
|
|
RUN npm prune --production
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Stage 4: Production
|
|
# -----------------------------------------------------------------------------
|
|
FROM node:20-alpine AS production
|
|
|
|
# Security: Run as non-root user
|
|
RUN addgroup -g 1001 -S nodejs && \
|
|
adduser -S nodejs -u 1001
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy built application
|
|
COPY --from=builder --chown=nodejs:nodejs /app/dist ./dist
|
|
COPY --from=builder --chown=nodejs:nodejs /app/node_modules ./node_modules
|
|
COPY --from=builder --chown=nodejs:nodejs /app/package*.json ./
|
|
|
|
# Set user
|
|
USER nodejs
|
|
|
|
# Expose port (standard: 3021 for construccion backend)
|
|
EXPOSE 3021
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
|
CMD curl -f http://localhost:3021/health || exit 1
|
|
|
|
# Production command
|
|
CMD ["node", "dist/server.js"]
|