diff --git a/Dockerfile b/Dockerfile index 0decd3c..987bc42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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