This commit is contained in:
tyuXX 2026-09-09 18:31:30 +03:00
commit 237d0c65ba
18 changed files with 1174 additions and 0 deletions

47
Dockerfile Normal file
View file

@ -0,0 +1,47 @@
# Multi-stage build for smaller final image
FROM node:18-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install all dependencies (including dev dependencies for build)
RUN npm install
# Copy source code
COPY . .
# Build TypeScript
RUN npm run build
# Production stage
FROM node:18-alpine AS production
# Install wget for health checks
RUN apk add --no-cache wget
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install only production dependencies
RUN npm ci --only=production
# Copy built files from builder stage
COPY --from=builder /app/dist ./dist
# Create logs directory
RUN mkdir -p /app/logs
# Expose the application port
EXPOSE 3000
# Set environment to production
ENV NODE_ENV=production
# Start the application
CMD ["node", "dist/index.js"]