Attempt to fix build issues in Docker

This commit is contained in:
Caileb 2025-05-29 16:05:51 -05:00
parent c5c30cf8c3
commit be821528cb
3 changed files with 11 additions and 6 deletions

View file

@ -4,12 +4,12 @@ FROM node:18-alpine
# Set working directory
WORKDIR /app
# 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 package files and install dependencies
COPY package.json package-lock.json ./
RUN npm ci --only=production
# Copy application source
COPY . .
# Install all dependencies, create dist folder, build with esbuild, then remove devDeps
RUN npm ci && mkdir -p dist && npm run build && npm prune --production
# Expose the application port
EXPOSE 3000