Skip to content

Commit 25279e6

Browse files
committed
Add Docker build workflow
1 parent 2617b34 commit 25279e6

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build Docker image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Build Docker image
14+
run: docker build .

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:20-alpine
2+
WORKDIR /app
3+
# Install pnpm
4+
RUN npm install -g pnpm
5+
# Copy package and lock files first for caching
6+
COPY package.json pnpm-lock.yaml ./
7+
RUN pnpm install --frozen-lockfile --prod
8+
# Copy source
9+
COPY . .
10+
RUN pnpm build
11+
EXPOSE 3000
12+
CMD ["node","build/index.js"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Seonglae
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,14 @@ npx -y supergateway --port 8000 --stdio "npx -y @modelcontextprotocol/server-fil
114114
```
115115

116116
Make sure to replace `/some/folder` with the appropriate path to your folder.
117+
118+
## Docker
119+
120+
You can build and run the server using Docker:
121+
122+
```bash
123+
docker build -t mcp-notion .
124+
docker run -e ROOT_PAGE=<your-root-page-id> -p 3000:3000 mcp-notion
125+
```
126+
127+
This exposes the server on port 3000 by default. Set `ROOT_PAGE` to the ID of the root Notion page you want to serve.

0 commit comments

Comments
 (0)