Gmail mcp (#57)

* gmail mcp

* x

* x

* x

* x

* x
This commit is contained in:
2026-03-29 10:58:49 +02:00
committed by GitHub
parent 5963d6fddc
commit d6977bad9d
4 changed files with 90 additions and 5 deletions
+3
View File
@@ -15,6 +15,7 @@ from flask import Flask, send_from_directory
from flask.json.provider import DefaultJSONProvider
from flask_socketio import SocketIO, emit
from configs.gmail_mcp import gmail_mcp
from enironment import Environment, wrap_in_cached
from processing import reset_caches
from steps.git import GitClone
@@ -305,6 +306,7 @@ class App:
import configs.torrserv_proxy
import configs.immich
import configs.registry
import configs.gmail_mcp
environments_l: List[Environment] = [
configs.brencher.brencher,
configs.brencher2.brencher2,
@@ -313,6 +315,7 @@ class App:
configs.torrserv_proxy.torrserv_proxy,
configs.immich.immich,
configs.registry.registry,
configs.gmail_mcp.gmail_mcp,
]
environments = {e.id: e for e in environments_l}
+72
View File
@@ -0,0 +1,72 @@
from enironment import Environment
from steps.checks import SimpleLog, UrlCheck
from steps.docker import DockerComposeBuild, DockerSwarmCheck, DockerSwarmDeploy
from steps.git import GitClone, CheckoutMerged, GitUnmerge
clone = GitClone(branchNamePrefix="immoscout")
checkoutMerged = CheckoutMerged(clone,
push=False,
git_user_email="rudolfss13@gmail.com",
git_user_name="brencher_bot"
)
buildDocker = DockerComposeBuild(clone,
docker_repo_username="",
docker_repo_password="",
docker_compose_path="gmail-mcp-server/docker-compose.yml",
docker_repo_url="https://registry.rudolf.keenetic.link",
publish=False,
envs=lambda: {
"version": "auto-" + checkoutMerged.progress().version,
},
)
dockerSwarmCheck = DockerSwarmCheck(
stack_name="gmail_mcp",
)
deployDocker = DockerSwarmDeploy(
wd=clone,
buildDocker=buildDocker,
stackChecker=dockerSwarmCheck,
envs=lambda: {
"version": "auto-" + checkoutMerged.progress().version,
},
stack_name="gmail_mcp",
docker_compose_path="gmail-mcp-server/docker-compose.yml",
)
unmerge = GitUnmerge(clone, dockerSwarmCheck)
checkPing1 = UrlCheck(
url="http://100.70.193.97:3000/health",
expected={ "ok": True, "service": "gmail-mcp-server" },
)
checkPing2 = UrlCheck(
url="http://100.70.193.97:3001/health",
expected={ "ok": True, "service": "telegram-mcp-server" },
)
logUrls = SimpleLog(message={
"userLinks": {
"AppGm": "http://100.70.193.97:3000/health",
"AppTg": "http://100.70.193.97:3001/health",
}
})
__all__ = ["gmail_mcp"]
gmail_mcp = Environment(
id="gmail_mcp",
branches=[("immoscout/main", "HEAD")],
dry=False,
repo="https://github.com/rudolf1/uber_backup.git",
pipeline=[
clone,
checkoutMerged,
buildDocker,
dockerSwarmCheck,
unmerge,
deployDocker,
checkPing1,
checkPing2,
logUrls
]
)
+14 -4
View File
@@ -57,9 +57,19 @@ class DockerComposeBuild(AbstractStep[List[str]]):
services = compose.get('services', {})
for name, svc in services.items():
if svc.get('build') is None:
build_section = svc.get('build')
if build_section is None:
continue
build_ctx = os.path.join(os.path.dirname(docker_compose_absolute_path), svc.get('build'))
if isinstance(build_section, dict):
build_ctx = build_section.get('context', '.')
build_dockerfile = build_section.get('dockerfile', 'Dockerfile')
else:
build_ctx = build_section
build_dockerfile = 'Dockerfile'
build_ctx = os.path.join(os.path.dirname(docker_compose_absolute_path), build_ctx)
build_dockerfile = os.path.join(os.path.dirname(docker_compose_absolute_path), build_dockerfile)
image = svc.get('image')
if not build_ctx or not image:
continue
@@ -80,8 +90,8 @@ class DockerComposeBuild(AbstractStep[List[str]]):
except docker_errors.ImageNotFound:
pass
logger.info(f"Building image {image} from {build_ctx}")
client.images.build(path=build_ctx, tag=image, nocache=True, rm=True)
logger.info(f"Building image {image} from {build_ctx}, {build_dockerfile}")
client.images.build(path=build_ctx, dockerfile=build_dockerfile, tag=image, nocache=True, rm=True)
if self.publish:
logger.info(f"Pushing image {image}")
+1 -1
View File
@@ -16,7 +16,7 @@ services:
- PYTHONUNBUFFERED=1
- VIRTUAL_HOST=brencher.rudolf.keenetic.link
- LETSENCRYPT_HOST=brencher.rudolf.keenetic.link
- PROFILES=brencher2,torrserv_proxy,immich,registry
- PROFILES=brencher2,torrserv_proxy,immich,registry,gmail_mcp
- SLAVE_BRENCHER=http://host.docker.internal:5002
# - SLAVE_BRENCHER='http://100.70.193.97:5002' .venv/bin/python3 backend/app.py brencher_localX
deploy: