Files
ocean-cleanup/server/Dockerfile
Paul Bailey 0e05769581 Rebrand application from 'Beach Litter Mapping Platform' to 'Litter Scouts'
- Updated app name in all source files, documentation, and configuration
- Changed package names in package.json files
- Updated header, titles, and user-facing text
- Modified email templates and notification text
- Updated steering rules and spec documents
2025-11-18 00:31:44 +00:00

50 lines
819 B
Docker

# Backend Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy prisma schema
COPY prisma ./prisma
# Generate Prisma client
RUN npx prisma generate
# Copy source code
COPY . .
# Build TypeScript
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies only
RUN npm ci --only=production
# Copy prisma schema and generated client
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
# Copy built application
COPY --from=builder /app/dist ./dist
# Create uploads directory
RUN mkdir -p uploads
# Expose port
EXPOSE 3000
# Start the application
CMD ["node", "dist/index.js"]