-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile.dev
More file actions
37 lines (27 loc) · 1016 Bytes
/
Dockerfile.dev
File metadata and controls
37 lines (27 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Litewrite Next.js Development Dockerfile
# Supports hot reload, code mounted via volume
FROM node:22-slim
WORKDIR /app
# Install OpenSSL (required by Prisma)
RUN apt-get update && apt-get install -y --no-install-recommends openssl && \
rm -rf /var/lib/apt/lists/*
# Copy dependency files
COPY package.json package-lock.json ./
COPY prisma ./prisma/
# Install dependencies
RUN npm ci --legacy-peer-deps
# Copy config files (these are not volume-mounted, need to be copied at build time)
COPY tsconfig.json ./
COPY next.config.js ./
COPY tailwind.config.ts ./
COPY postcss.config.js ./
COPY middleware.ts ./
# Code directories are volume-mounted for hot reload
ENV NODE_ENV=development
ENV NEXT_TELEMETRY_DISABLED=1
EXPOSE 3000
# Development mode startup:
# 1. Generate Prisma Client (prisma dir is volume-mounted, needs runtime generation)
# 2. Sync database schema (auto create/update tables)
# 3. Start Next.js dev server
CMD ["sh", "-c", "npx prisma generate && npx prisma db push && npm run dev"]