-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
29 lines (21 loc) · 1.03 KB
/
Copy pathDockerfile.dev
File metadata and controls
29 lines (21 loc) · 1.03 KB
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
# syntax=docker/dockerfile:1
# =============================================================================
# StudyForge — Development Dockerfile
# =============================================================================
# Single-stage image for development with hot-reload support.
# Source code is volume-mounted, not baked into the image.
# =============================================================================
FROM node:24.1-alpine3.20
# Install build tools for bcrypt + runtime utilities
RUN apk add --no-cache python3 make g++ curl netcat-openbsd
WORKDIR /app
# Copy package files and install dependencies
COPY package.json package-lock.json ./
RUN --mount=type=cache,target=/root/.npm npm ci --ignore-scripts --legacy-peer-deps && npm rebuild bcrypt
# Source code is mounted as a volume (not copied)
# This enables hot-reload with tsx watch and Vite HMR
EXPOSE 5000
ENV NODE_ENV=development \
API_PORT=5000
# Use tsx watch for hot-reload in development
CMD ["npx", "tsx", "watch", "--env-file=.env", "server/index.ts"]