-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (29 loc) · 920 Bytes
/
Dockerfile
File metadata and controls
41 lines (29 loc) · 920 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
40
41
FROM node:25.6.0-alpine AS builder
WORKDIR /app
RUN npm i -g pnpm
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY tsconfig.json tsconfig.build.json nest-cli.json ./
COPY src ./src
RUN pnpm build
FROM node:25.6.0-alpine
WORKDIR /app
ENV NODE_ENV=production \
ENV=prod \
HOST=0.0.0.0 \
PORT=3002 \
POSTGRES_URL=postgres://postgres:postgres@postgres:5432/benchmarks \
MONGODB_URL=mongodb://mongodb:27017 \
MONGODB_DB=benchmarks \
REDIS_URL=redis://redis:6379 \
CASSANDRA_CONTACT_POINTS=cassandra \
CASSANDRA_KEYSPACE=benchmarks \
CASSANDRA_LOCAL_DATACENTER=datacenter1
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json ./
RUN addgroup -g 1001 -S app-group && \
adduser -S app-runner -u 1001 -G app-group
USER app-runner
EXPOSE 3002
CMD ["node", "dist/main.js"]