-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (26 loc) · 787 Bytes
/
Dockerfile
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
48
49
FROM imbios/bun-node:21-slim AS deps
ARG DEBIAN_FRONTEND=noninteractive
ENV NODE_ENV production
ARG API_URL
ENV NEXT_PUBLIC_API_URL ${API_URL}
RUN apt-get -y update && \
apt-get install -yq openssl git ca-certificates tzdata && \
ln -fs /usr/share/zoneinfo/Asia/Jakarta /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile
FROM deps AS builder
WORKDIR /app
COPY . .
RUN bun run build
FROM node:21-slim AS runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static/
EXPOSE 3000
ENV PORT 3000
CMD ["node", "server.js"]