-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (32 loc) · 1022 Bytes
/
Dockerfile
File metadata and controls
47 lines (32 loc) · 1022 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
42
43
44
45
46
47
FROM oven/bun:latest AS deps
WORKDIR /app
COPY bun.lock package.json ./
RUN bun install --frozen-lockfile
FROM node:24-alpine AS builder
WORKDIR /app
ARG NEXT_PUBLIC_ADDRESS
ARG NEXT_PUBLIC_PHONE
ARG NEXT_PUBLIC_GIT_SHA
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_SHARP_PATH=/app/node_modules/sharp
ENV NEXT_TELEMETRY_DISABLED=1
ENV NEXT_PUBLIC_ADDRESS=$NEXT_PUBLIC_ADDRESS
ENV NEXT_PUBLIC_PHONE=$NEXT_PUBLIC_PHONE
ENV NEXT_PUBLIC_GIT_SHA=$NEXT_PUBLIC_GIT_SHA
RUN realpath .
RUN npm run build:content
RUN npm run build --turbopack
FROM node:24-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
RUN mkdir .next
RUN chown nextjs:nodejs .next
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
CMD ["node", "server.js", "--hostname", "0.0.0.0"]