-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.api
More file actions
29 lines (22 loc) · 830 Bytes
/
Copy pathDockerfile.api
File metadata and controls
29 lines (22 loc) · 830 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
# syntax=docker/dockerfile:1.5
FROM node:24-alpine
WORKDIR /app
# Install pnpm globally
RUN npm install -g pnpm
# Copy lockfiles and package.json files first for better layer caching
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY apps/api/package.json ./apps/api/
COPY apps/dashboard/package.json ./apps/dashboard/
COPY apps/discord-bot/package.json ./apps/discord-bot/
COPY packages/ ./packages/
# Use BuildKit cache mount for pnpm store to speed up repeated installs
# Note: We don't mount node_modules as cache because workspace linking relies on real installs
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile
# Copy rest of source for dev runtime
COPY . .
ENV NODE_ENV=local \
HOST=0.0.0.0 \
PORT=4005
EXPOSE 4005
CMD ["pnpm", "--filter", "api", "dev"]