deafgain-website/Dockerfile
TheMaddax 14fb61aab9 Development environment:
- Added Dockerfile.dev for local development
- Configured volume mounts for hot reloading
- Set up Vite dev server with proper host binding

Production environment:
- Streamlined multi-stage build process
- Removed Nginx in favor of future Caddy setup
- Optimized container size and build steps
2024-11-30 02:10:00 -06:00

29 lines
580 B
Docker

FROM node:20-alpine AS base
# Enable pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml* ./
# Install dependencies
FROM base AS deps
RUN pnpm install --frozen-lockfile
# Build the app
FROM base AS builder
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build
# Production image
FROM base AS runner
COPY --from=deps /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY package.json ./
EXPOSE 804
CMD ["pnpm", "preview", "--port", "804", "--host"]