Skip to content

Commit 7b41639

Browse files
committed
feat: docker updates
1 parent 62e0419 commit 7b41639

5 files changed

Lines changed: 149 additions & 0 deletions

File tree

.dockerignore

Whitespace-only changes.

DOCKER.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Docker Support
2+
3+
This project includes Docker support to make deployment and development easier.
4+
5+
## Prerequisites
6+
7+
- Docker installed on your system
8+
- GitHub token, owner, and repository information for the `.env` file
9+
10+
## Environment Variables
11+
12+
Make sure to set the following environment variables in your `.env` file:
13+
14+
```
15+
GITHUB_TOKEN=your_github_token
16+
GITHUB_OWNER=your_github_username_or_organization
17+
GITHUB_REPO=your_repository_name
18+
```
19+
20+
## Building the Docker Image
21+
22+
```bash
23+
docker build -t mcp-github-project-manager .
24+
```
25+
26+
## Running the Container
27+
28+
```bash
29+
# Run the container with your .env file
30+
docker run -it --env-file .env mcp-github-project-manager
31+
32+
# Alternatively, you can provide environment variables directly
33+
docker run -it \
34+
-e GITHUB_TOKEN=your_github_token \
35+
-e GITHUB_OWNER=your_github_username_or_organization \
36+
-e GITHUB_REPO=your_repository_name \
37+
mcp-github-project-manager
38+
```
39+
40+
## Development with Docker
41+
42+
For development purposes, you can mount your local source directory into the container:
43+
44+
```bash
45+
docker run -it \
46+
--env-file .env \
47+
-v $(pwd)/src:/app/src \
48+
mcp-github-project-manager
49+
```
50+
51+
This allows you to make changes to your source code and see them reflected in the container.

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Use Node.js 18 as the base image (matches your package.json engine requirement)
2+
FROM node:18-alpine
3+
4+
# Create app directory
5+
WORKDIR /app
6+
7+
# Install pnpm (since your project uses pnpm-lock.yaml)
8+
RUN npm install -g pnpm
9+
10+
# Copy package.json, pnpm-lock.yaml and other configuration files
11+
COPY package.json pnpm-lock.yaml tsconfig.json tsconfig.build.json ./
12+
13+
# Install dependencies
14+
RUN pnpm install --frozen-lockfile
15+
16+
# Copy source code and other necessary files
17+
COPY src/ ./src/
18+
COPY .env.example ./.env.example
19+
20+
# Build the project
21+
RUN pnpm build
22+
23+
# Create a .env file if one doesn't exist
24+
RUN if [ ! -f .env ]; then cp .env.example .env || echo "No .env.example found"; fi
25+
26+
# Expose any ports your application might need (optional)
27+
# EXPOSE 3000
28+
29+
# Set environment variables
30+
ENV NODE_ENV=production
31+
32+
# Start the MCP server
33+
CMD ["node", "build/index.js"]

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,37 @@ A Model Context Protocol (MCP) server implementation that provides GitHub Projec
1010

1111
This server implements the [Model Context Protocol](https://modelcontextprotocol.io) to expose GitHub Projects functionality to LLM clients and applications. It provides tools for managing projects, milestones, sprints, and metrics through GitHub's GraphQL API while maintaining state and handling errors according to MCP specifications.
1212

13+
## Quick Start
14+
15+
### Using NPM
16+
```bash
17+
# Install the package globally
18+
npm install -g mcp-github-project-manager
19+
20+
# Set up your environment variables
21+
export GITHUB_TOKEN="your_github_token"
22+
export GITHUB_OWNER="your_github_username_or_organization"
23+
export GITHUB_REPO="your_repository_name"
24+
25+
# Run the MCP server
26+
mcp-github-project-manager
27+
```
28+
29+
### Using Docker
30+
```bash
31+
# Build the Docker image
32+
docker build -t mcp-github-project-manager .
33+
34+
# Run with environment variables
35+
docker run -it \
36+
-e GITHUB_TOKEN=your_github_token \
37+
-e GITHUB_OWNER=your_github_username_or_organization \
38+
-e GITHUB_REPO=your_repository_name \
39+
mcp-github-project-manager
40+
```
41+
42+
For more details on Docker usage, see [DOCKER.md](DOCKER.md).
43+
1344
## Key Features
1445

1546
- **Project Management**

dockerignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Dependencies
2+
node_modules
3+
npm-debug.log
4+
pnpm-debug.log
5+
yarn-debug.log
6+
yarn-error.log
7+
8+
# Build output
9+
build
10+
11+
# Testing
12+
coverage
13+
14+
# Environment variables
15+
.env
16+
17+
# Version control
18+
.git
19+
.gitignore
20+
21+
# IDE files
22+
.idea
23+
.vscode
24+
*.sublime-workspace
25+
*.sublime-project
26+
27+
# Temporary files
28+
tmp
29+
.tmp
30+
*.log
31+
32+
# OS generated files
33+
.DS_Store
34+
Thumbs.db

0 commit comments

Comments
 (0)