Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
ARG NOTION_PAGE_ID
|
2 |
+
# Install dependencies only when needed
|
3 |
+
FROM node:18-alpine3.18 AS deps
|
4 |
+
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
5 |
+
RUN apk add --no-cache libc6-compat
|
6 |
+
WORKDIR /app
|
7 |
+
COPY package.json ./
|
8 |
+
RUN yarn install --frozen-lockfile
|
9 |
+
|
10 |
+
# Rebuild the source code only when needed
|
11 |
+
FROM node:18-alpine3.18 AS builder
|
12 |
+
ARG NOTION_PAGE_ID
|
13 |
+
WORKDIR /app
|
14 |
+
COPY --from=deps /app/node_modules ./node_modules
|
15 |
+
COPY . .
|
16 |
+
RUN yarn build
|
17 |
+
|
18 |
+
ENV NODE_ENV production
|
19 |
+
|
20 |
+
EXPOSE 3000
|
21 |
+
|
22 |
+
# Next.js collects completely anonymous telemetry data about general usage.
|
23 |
+
# Learn more here: https://nextjs.org/telemetry
|
24 |
+
# Uncomment the following line in case you want to disable telemetry.
|
25 |
+
# ENV NEXT_TELEMETRY_DISABLED 1
|
26 |
+
|
27 |
+
CMD ["yarn", "start"]
|