-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.dev
More file actions
39 lines (30 loc) · 887 Bytes
/
Dockerfile.dev
File metadata and controls
39 lines (30 loc) · 887 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
38
39
# Use Node.js 22 on Debian slim for faster development
FROM node:22-slim
# Update npm to latest version
RUN npm install -g npm@latest
# Install dependencies for Prisma and other tools
RUN apt-get update && apt-get install -y --no-install-recommends \
openssl \
ca-certificates \
curl \
netcat-openbsd \
postgresql-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set working directory
WORKDIR /app
# Copy application code first (needed for postinstall script)
COPY . .
# Install dependencies
RUN npm install
# Copy and set permissions for entrypoint script
COPY docker/entrypoint-dev.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Generate Prisma client
RUN npm run db:generate || true
# Expose ports
# 3000 - Backend (NestJS)
# 3001 - Frontend (Next.js)
EXPOSE 3000 3001
# Set entrypoint
ENTRYPOINT ["/entrypoint.sh"]