Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Docker

on:
push:
branches: [main]
pull_request:

jobs:
build:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build Docker image
run: docker build -t glean-mcp-server:test .

- name: Verify Glean MCP server starts
run: timeout 3 docker run --rm glean-mcp-server:test || [ $? -eq 124 ]
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:20-alpine

ENV NODE_ENV=production

WORKDIR /app

COPY . ./

RUN addgroup -g 1001 -S nodejs \
&& adduser -S mcpserver -u 1001 \
&& mkdir -p /app/logs \
&& chown -R mcpserver:nodejs /app /usr/local

USER mcpserver

RUN npm install -g rimraf pnpm typescript \
&& pnpm -r install

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD pgrep -f "node.*mcp-server" || exit 1

CMD ["npx", "-y", "@gleanwork/local-mcp-server"]