Remove Containerfile and update Docker Compose configuration; add GitHub Actions workflow for automated image build and push

This commit is contained in:
sha
2026-03-20 14:24:02 +02:00
parent 42cf48a9a4
commit 120695c0a5
4 changed files with 44 additions and 25 deletions
+41
View File
@@ -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
-22
View File
@@ -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"]
+2
View File
@@ -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
View File
@@ -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: