mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
Configure GitHub MCP server in devcontainer environment (Closes #25)
This commit is contained in:
13
.devcontainer/.env.example
Normal file
13
.devcontainer/.env.example
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# GitHub MCP Server Configuration
|
||||||
|
GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here
|
||||||
|
|
||||||
|
# PostgreSQL Configuration
|
||||||
|
POSTGRES_USER=financeuser
|
||||||
|
POSTGRES_PASSWORD=changeme
|
||||||
|
POSTGRES_DB=finance
|
||||||
|
POSTGRES_PORT=5432
|
||||||
|
|
||||||
|
# pgAdmin Configuration
|
||||||
|
PGADMIN_DEFAULT_EMAIL=peter@peterwood.dev
|
||||||
|
PGADMIN_DEFAULT_PASSWORD=admin
|
||||||
|
PGADMIN_PORT=5050
|
||||||
@@ -2,7 +2,9 @@
|
|||||||
"name": "Finance App Development",
|
"name": "Finance App Development",
|
||||||
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
|
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/git:1": {}
|
"ghcr.io/devcontainers/features/git:1": {},
|
||||||
|
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
|
||||||
|
"ghcr.io/devcontainers/features/github-cli:1": {}
|
||||||
},
|
},
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
@@ -40,12 +42,23 @@
|
|||||||
"**/node_modules": true,
|
"**/node_modules": true,
|
||||||
"**/.idea": true
|
"**/.idea": true
|
||||||
},
|
},
|
||||||
"terminal.integrated.defaultProfile.linux": "bash"
|
"terminal.integrated.defaultProfile.linux": "bash",
|
||||||
|
"mcp.servers.github": {
|
||||||
|
"command": "docker",
|
||||||
|
"args": ["run", "-i", "--rm", "--env-file", "${containerWorkspaceFolder}/.devcontainer/.env", "ghcr.io/github/github-mcp-server"],
|
||||||
|
"env": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"forwardPorts": [3000],
|
"forwardPorts": [3000],
|
||||||
"postCreateCommand": "npm install && npm run check",
|
"postCreateCommand": "npm install && npm run check",
|
||||||
"remoteUser": "node",
|
"remoteUser": "node",
|
||||||
"mounts": ["type=bind,source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,readonly"]
|
"mounts": [
|
||||||
|
"type=bind,source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,readonly"
|
||||||
|
],
|
||||||
|
"remoteEnv": {
|
||||||
|
"GITHUB_PERSONAL_ACCESS_TOKEN": "${localEnv:GITHUB_PERSONAL_ACCESS_TOKEN}"
|
||||||
|
},
|
||||||
|
"postStartCommand": "gh auth status || gh auth login"
|
||||||
}
|
}
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -27,3 +27,6 @@ pnpm-debug.log*
|
|||||||
|
|
||||||
# Test coverage
|
# Test coverage
|
||||||
coverage/
|
coverage/
|
||||||
|
|
||||||
|
# DevContainer environment files
|
||||||
|
.devcontainer/.env
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -11,4 +11,33 @@ A web application for managing financial transactions across multiple bank accou
|
|||||||
* **Key Features (Implemented & Planned):** Account switching, transaction listing, adding, editing, and deleting transactions.
|
* **Key Features (Implemented & Planned):** Account switching, transaction listing, adding, editing, and deleting transactions.
|
||||||
|
|
||||||
## Logs
|
## Logs
|
||||||
This app is currently deployed using Cloudflare Pages. The logs can be viewed with the `npx wrangler pages deployment tail --project-name finance` command. T
|
This app is currently deployed using Cloudflare Pages. The logs can be viewed with the `npx wrangler pages deployment tail --project-name finance` command.
|
||||||
|
|
||||||
|
## Development Environment Setup
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
- VS Code with Remote Containers extension
|
||||||
|
- Docker and Docker Compose
|
||||||
|
- Git
|
||||||
|
|
||||||
|
### Initial Setup
|
||||||
|
1. Clone the repository
|
||||||
|
2. Copy `.devcontainer/.env.example` to `.devcontainer/.env`
|
||||||
|
3. Update the environment variables in `.devcontainer/.env`
|
||||||
|
4. Open the project in VS Code and select "Reopen in Container" when prompted
|
||||||
|
|
||||||
|
### GitHub MCP Server
|
||||||
|
The project uses GitHub's MCP server for development tasks. The server runs in a Docker container and is automatically configured when you open the project in a devcontainer.
|
||||||
|
|
||||||
|
#### Configuration
|
||||||
|
- The MCP server uses GitHub authentication via Personal Access Token
|
||||||
|
- Token is stored securely in `.devcontainer/.env` (not committed to repository)
|
||||||
|
- GitHub CLI is installed in the devcontainer for easier authentication management
|
||||||
|
- Container health monitoring is configured
|
||||||
|
|
||||||
|
#### Usage
|
||||||
|
The MCP server will automatically start when you open the project in a devcontainer. If you need to manually authenticate:
|
||||||
|
1. Run `gh auth login` in the terminal
|
||||||
|
2. Follow the prompts to authenticate with your GitHub account
|
||||||
|
|
||||||
|
### Database Setup
|
||||||
Reference in New Issue
Block a user