local-llm-agent/apps/gateway/Dockerfile
Adrian Flores Cortes 3def230d58 Initial commit: local-llm-agent infrastructure project
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:42:45 -06:00

43 lines
793 B
Docker

# Local LLM Agent - Gateway Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Copy package files and install production dependencies only
COPY package*.json ./
RUN npm ci --only=production
# Copy built application
COPY --from=builder /app/dist ./dist
# Set environment variables
ENV NODE_ENV=production
ENV GATEWAY_PORT=3160
# Expose port
EXPOSE 3160
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3160/health || exit 1
# Start the application
CMD ["node", "dist/main.js"]