# Dockerfile for LocalGreenChain # Uses Bun for fast builds and runtime FROM oven/bun:1 as base WORKDIR /app # Install dependencies COPY package.json bun.lockb* ./ RUN bun install --frozen-lockfile # Copy application code COPY . . # Build Next.js application RUN bun run build # Production stage FROM oven/bun:1-slim as production WORKDIR /app # Copy dependencies and build output COPY --from=base /app/node_modules ./node_modules COPY --from=base /app/.next ./.next COPY --from=base /app/public ./public COPY --from=base /app/package.json ./package.json COPY --from=base /app/next.config.js ./next.config.js # Create data directory RUN mkdir -p /app/data # Expose port EXPOSE 3001 # Set environment to production ENV NODE_ENV=production # Run the application CMD ["bun", "run", "start"]