Files
RedditBot/Dockerfile
T
2026-01-04 19:24:56 +00:00

31 lines
716 B
Docker

# Use the official Playwright image which includes all browser dependencies
FROM mcr.microsoft.com/playwright:v1.57.0-jammy
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (including devDependencies for building)
RUN npm ci
# Copy source code
COPY . .
# Build the TypeScript project
RUN npm run build
# Prune dev dependencies to reduce image size (optional, but good practice)
# Note: we need to keep some deps if they are runtime requirements
# npm prune --production
# Create data directory
RUN mkdir -p data
# Expose the port defined in config (default 3000)
EXPOSE 3000
# Start the application using the compiled code
CMD ["node", "dist/index.js"]