File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ .next *
Original file line number Diff line number Diff line change
1
+ ARG NOTION_PAGE_ID
2
+ # Install dependencies only when needed
3
+ FROM node:14-alpine 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 yarn.lock ./
8
+ RUN yarn install --frozen-lockfile
9
+
10
+ # Rebuild the source code only when needed
11
+ FROM node:14-alpine 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" ]
Original file line number Diff line number Diff line change 72
72
73
73
## 快速开发
74
74
75
+ - 通过Docker体验本地部署
76
+ ``` bash
77
+ docker build -t notionnext .
78
+ docker run -p 3000:3000 notionnext
79
+ ```
80
+
81
+ - 本地安装Nodejs进行开发
75
82
``` bash
76
83
yarn # 安装依赖
77
84
yarn run dev # 本地开发
You can’t perform that action at this time.
0 commit comments