Compare commits

...
14 Commits
Author SHA1 Message Date
Daniel SamsonandClaude Haiku 4.5 09f1056303 fix: use COPY instead of downloading from GitHub to include local changes
Build and Push Docker Image / build (push) Successful in 46s
The Dockerfile was downloading from GitHub instead of using the local
repository source, which meant our config.ts fixes weren't being included.
Changed to COPY to build with the Gitea repository source.

Also corrected EXPOSE from 3000 to 8080 (the actual port).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-19 19:03:47 +01:00
Daniel Samson 58118ee576 chore: add workflow_dispatch trigger to allow manual runs
Build and Push Docker Image / build (push) Successful in 15s
2026-10-19 19:01:32 +01:00
Daniel Samson ad29d5ba19 fix: remove external action dependency from workflow
Build and Push Docker Image / build (push) Successful in 7s
2026-10-19 19:00:13 +01:00
Daniel SamsonandClaude Haiku 4.5 b24f89e78d fix: simplify Gitea Actions workflow for Docker build
Build and Push Docker Image / build (push) Successful in 55s
Use native Docker commands instead of GitHub Actions docker/* actions
which may not be available in Gitea Actions environment.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-19 18:59:56 +01:00
Daniel SamsonandClaude Haiku 4.5 01aebf9e02 fix: bind HTTP server to 0.0.0.0 instead of 127.0.0.1 for external access
Build and Push Docker Image / build (push) Successful in 21s
The MCP server was only listening on localhost (127.0.0.1), making it
unreachable from the Kubernetes service. Changed default host binding to
0.0.0.0 to accept traffic from all interfaces, allowing ingress routing.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-19 18:54:08 +01:00
Daniel Samson 678c84ebd3 fix: ensure dev dependencies available during build before pruning
Build and Push Docker Image / build (push) Successful in 55s
2026-10-19 18:33:13 +01:00
Daniel Samson 917106eab5 fix: use correct npm script (npm run serve:http)
Build and Push Docker Image / build (push) Successful in 21s
2026-10-19 18:30:10 +01:00
Daniel Samson e45fb9121a ci: simplify push condition (always push on main branch)
Build and Push Docker Image / build (push) Successful in 21s
2026-10-19 18:18:01 +01:00
Daniel Samson 941e77bfa0 fix: use curl/tar instead of git for downloading source (fixes exit code 127)
Build and Push Docker Image / build (push) Successful in 55s
2026-10-19 18:13:48 +01:00
Daniel Samson a72cde84c7 fix: improve Dockerfile with better git clone handling and build steps
Build and Push Docker Image / build (push) Successful in 57s
2026-10-19 18:12:06 +01:00
Daniel Samson af3c9082bc ci: rename secret to CI_TOKEN (GITEA_ prefix not allowed)
Build and Push Docker Image / build (push) Failing after 26s
2026-10-19 18:10:59 +01:00
Daniel Samson b994bae485 ci: use ci@samson.media for Gitea registry authentication
Build and Push Docker Image / build (push) Failing after 10s
2026-10-19 18:07:32 +01:00
Daniel Samson 095b2fabb8 ci: use ci-user for Gitea registry authentication
Build and Push Docker Image / build (push) Failing after 11s
2026-10-19 18:04:15 +01:00
Daniel Samson 573c13a467 chore: add Dockerfile and CI/CD workflow for Docker image builds
Build and Push Docker Image / build (push) Failing after 10s
2026-10-19 18:02:49 +01:00
3 changed files with 42 additions and 31 deletions

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git clone https://gitea.samson.media/samson-media/brave-search-mcp-server.git .
git checkout ${{ github.sha }}
- name: Build Docker image
run: |
docker build -t gitea.samson.media/samson-media/brave-search-mcp-server:latest .
docker build -t "gitea.samson.media/samson-media/brave-search-mcp-server:${GITHUB_SHA:0:7}" .
- name: Log in and push
run: |
echo "${{ secrets.CI_TOKEN }}" | docker login -u ci@samson.media --password-stdin gitea.samson.media
docker push gitea.samson.media/samson-media/brave-search-mcp-server:latest
docker push "gitea.samson.media/samson-media/brave-search-mcp-server:${GITHUB_SHA:0:7}"
+12 -29
View File
@@ -1,38 +1,21 @@
FROM node:alpine@sha256:5209bcaca9836eb3448b650396213dbe9d9a34d31840c2ae1f206cb2986a8543 AS builder
RUN apk add --no-cache openssl=3.5.8-r0
FROM node:22-alpine
WORKDIR /app
COPY ./package.json ./package.json
COPY ./package-lock.json ./package-lock.json
# Copy source code from the repository
COPY . .
RUN npm ci --ignore-scripts
COPY ./src ./src
COPY ./tsconfig.json ./tsconfig.json
# Install ALL dependencies (including dev deps needed for build)
RUN npm ci
# Build the project
RUN npm run build
FROM node:alpine@sha256:5209bcaca9836eb3448b650396213dbe9d9a34d31840c2ae1f206cb2986a8543 AS release
# Now prune dev dependencies
RUN npm prune --production
RUN apk add --no-cache openssl=3.5.8-r0
# Expose the MCP server port
EXPOSE 8080
WORKDIR /app
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json
ENV NODE_ENV=production
# The server defaults to binding 127.0.0.1 for safe local execution. Inside a
# container the port must be reachable through the published mapping, so bind to
# all interfaces here. Deployments can still override BRAVE_MCP_HOST.
ENV BRAVE_MCP_HOST=0.0.0.0
RUN npm ci --ignore-scripts --omit-dev
USER node
ENTRYPOINT ["node", "dist/index.js"]
# Start the pre-built MCP server directly (don't rebuild)
CMD ["node", "dist/index.js", "--transport", "http"]
+2 -2
View File
@@ -32,7 +32,7 @@ type Configuration = {
const state: Configuration & { ready: boolean } = {
transport: 'stdio',
port: 8080,
host: '127.0.0.1',
host: '0.0.0.0',
braveApiKey: process.env.BRAVE_API_KEY ?? '',
loggingLevel: 'info',
ready: false,
@@ -81,7 +81,7 @@ export function getOptions(): Configuration | false {
.option(
'--host <string>',
'desired host for HTTP transport',
process.env.BRAVE_MCP_HOST ?? '127.0.0.1'
process.env.BRAVE_MCP_HOST ?? '0.0.0.0'
)
.option(
'--allowed-origins <origins...>',