Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
dist
.git
.github
docs
*.md
.env*
.vscode
.devcontainer
.npmrc
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,39 @@ jobs:
path: dist/

- run: npm publish --provenance --access public

# ── 5. Build & push Docker image to GHCR ─────────────────────────────
docker-publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.tag }}

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}},value=${{ inputs.tag }}
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.tag }}
type=semver,pattern={{major}},value=${{ inputs.tag }}

- uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Initial public release.
- Human-readable names accepted for countries and services
- Idle HTTP session cleanup (30-minute TTL)
- Set MCP server version from `package.json`
- Docker image published to GHCR (`ghcr.io/platfone-com/mcp`)
- Documentation for installation, development, and security policy
- GitHub Actions for npm publish
- GitHub Actions for npm publish and Docker image build
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ── Build stage ─────────────────────────────────────────────────────────
FROM node:22-slim AS build

WORKDIR /app

COPY package.json package-lock.json ./
RUN npm ci

COPY tsconfig.json ./
COPY src/ src/
RUN npm run build

# ── Production stage ───────────────────────────────────────────────────
FROM node:22-slim

LABEL org.opencontainers.image.source="https://github.com/platfone-com/mcp"
LABEL org.opencontainers.image.description="Platfone MCP server for SMS Activation"
LABEL org.opencontainers.image.licenses="MIT"

WORKDIR /app

COPY package.json package-lock.json ./
RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force

COPY --from=build /app/dist/ dist/

# Default: stdio transport. Override CMD for HTTP:
# docker run -p 3000:3000 -e PLATFONE_API_KEY=… <image> node dist/index.js --transport=http

USER node

CMD ["node", "dist/index.js"]
Loading