forked from shreyan001/backend-socials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 684 Bytes
/
Dockerfile
File metadata and controls
39 lines (29 loc) · 684 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
FROM node:18-alpine
WORKDIR /app
# Install system dependencies including additional tools for AI packages
RUN apk add --no-cache \
python3 \
make \
g++ \
git \
chromium \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont
# Use corepack for pnpm
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
# Copy package files
COPY package.json ./
COPY pnpm-lock.yaml ./
# Install dependencies (without postinstall script running build)
RUN pnpm install --unsafe-perm
# Copy source code AFTER installing dependencies
COPY . .
# Now build the application
RUN pnpm build
EXPOSE 3001
CMD ["pnpm", "start"]