chore: update Dockerfile to include .nvmrc and .npmrc files

- Added .nvmrc and .npmrc files to the Docker image for consistent Node.js versioning and npm configuration.
- Removed the direct copy of the prisma directory to streamline the build process.
This commit is contained in:
2024-12-05 18:42:16 +07:00
parent 2033d0ec26
commit 14edf629bd

View File

@@ -34,9 +34,12 @@ WORKDIR /app
# Copy only necessary files with minimal layers # Copy only necessary files with minimal layers
COPY --from=dependencies /app/node_modules ./node_modules COPY --from=dependencies /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist COPY --from=builder /app/dist ./dist
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/package*.json ./ COPY --from=builder /app/package*.json ./
# mount nvmrc and npmrc from host
COPY .nvmrc ./
COPY .npmrc ./
# Expose the port # Expose the port
EXPOSE 3000 EXPOSE 3000