Dockerfile fix for esbuild

This commit is contained in:
Caileb 2025-05-29 15:51:39 -05:00
parent 1cb1c1a333
commit e3a1a3c064

View file

@ -4,14 +4,13 @@ FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files, config script, and install dependencies
# Copy package files, config script
COPY package.json package-lock.json esbuild.config.js ./
# Copy application source before build so esbuild can locate entry files
COPY . .
# Install all dependencies, build with esbuild, then remove devDeps
RUN npm ci && npm run build && npm prune --production
# Copy application source
COPY . .
# Expose the application port
EXPOSE 3000