mirror of
https://github.com/shadoll/redmine-mcp.git
synced 2026-08-28 03:27:56 +00:00
Remove Containerfile and update Docker Compose configuration; add GitHub Actions workflow for automated image build and push
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
name: Build and push image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: build/Containerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.repository }}:latest
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
FROM python:3.12-slim
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Install uv
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
||||||
|
|
||||||
# Copy dependency files first for layer caching
|
|
||||||
COPY pyproject.toml uv.lock* ./
|
|
||||||
|
|
||||||
# Install deps into system python (no venv needed in container)
|
|
||||||
RUN uv pip install --system mcp httpx
|
|
||||||
|
|
||||||
COPY server.py .
|
|
||||||
|
|
||||||
ENV MCP_TRANSPORT=http
|
|
||||||
ENV MCP_HOST=0.0.0.0
|
|
||||||
ENV MCP_PORT=8000
|
|
||||||
|
|
||||||
EXPOSE 8000
|
|
||||||
|
|
||||||
CMD ["python", "server.py"]
|
|
||||||
@@ -66,6 +66,8 @@ REDMINE_API_KEY=your_personal_api_key_here
|
|||||||
|
|
||||||
### 3. Run the container
|
### 3. Run the container
|
||||||
|
|
||||||
|
The image is published automatically to `ghcr.io/shadoll/redmine-mcp:latest` on every push to `main`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
# or with podman:
|
# or with podman:
|
||||||
|
|||||||
+1
-3
@@ -1,8 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
redmine-mcp:
|
redmine-mcp:
|
||||||
build:
|
image: ghcr.io/shadoll/redmine-mcp:latest
|
||||||
context: .
|
|
||||||
dockerfile: Containerfile
|
|
||||||
ports:
|
ports:
|
||||||
- "8765:8000"
|
- "8765:8000"
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user