{ "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "MetaBuilder Deployment CLI — command definitions (argparse from JSON)", "version": "1.0.0", "program": { "prog": "deployment.py", "description": "MetaBuilder Deployment CLI" }, "definitions": { "base_build_order": ["apt", "conan-deps", "android-sdk", "node-deps", "pip-deps", "devcontainer"], "stack_commands": ["up", "start", "down", "stop", "build", "restart", "logs", "ps", "status", "clean"], "base_images": { "apt": { "dockerfile": "Dockerfile.apt", "tag": "metabuilder/base-apt:latest" }, "conan-deps": { "dockerfile": "Dockerfile.conan-deps", "tag": "metabuilder/base-conan-deps:latest" }, "node-deps": { "dockerfile": "Dockerfile.node-deps", "tag": "metabuilder/base-node-deps:latest" }, "pip-deps": { "dockerfile": "Dockerfile.pip-deps", "tag": "metabuilder/base-pip-deps:latest" }, "android-sdk": { "dockerfile": "Dockerfile.android-sdk", "tag": "metabuilder/base-android-sdk:latest", "context": "base-images" }, "devcontainer": { "dockerfile": "Dockerfile.devcontainer", "tag": "metabuilder/devcontainer:latest" } }, "nexus_images": { "base": [ { "local": "metabuilder/base-apt:latest", "name": "base-apt", "size": "2.8GB" }, { "local": "metabuilder/base-node-deps:latest", "name": "base-node-deps", "size": "5.5GB" }, { "local": "metabuilder/base-pip-deps:latest", "name": "base-pip-deps", "size": "1.4GB" }, { "local": "metabuilder/base-android-sdk:latest", "name": "base-android-sdk", "size": "6.1GB" } ], "apps": [ { "local": "deployment-dbal-init:latest", "name": "dbal-init", "size": "12MB" }, { "local": "deployment-storybook:latest", "name": "storybook", "size": "112MB" }, { "local": "deployment-nginx:latest", "name": "nginx", "size": "92MB" }, { "local": "deployment-nginx-stream:latest", "name": "nginx-stream", "size": "92MB" }, { "local": "deployment-pastebin-backend:latest", "name": "pastebin-backend", "size": "236MB" }, { "local": "deployment-emailclient-app:latest", "name": "emailclient", "size": "350MB" }, { "local": "deployment-email-service:latest", "name": "email-service", "size": "388MB" }, { "local": "deployment-exploded-diagrams:latest", "name": "exploded-diagrams", "size": "315MB" }, { "local": "deployment-pastebin:latest", "name": "pastebin", "size": "382MB" }, { "local": "deployment-frontend-app:latest", "name": "frontend-app", "size": "361MB" }, { "local": "deployment-workflowui:latest", "name": "workflowui", "size": "542MB" }, { "local": "deployment-postgres-dashboard:latest", "name": "postgres-dashboard", "size": "508MB" }, { "local": "deployment-smtp-relay:latest", "name": "smtp-relay", "size": "302MB" }, { "local": "deployment-dbal:latest", "name": "dbal", "size": "3.0GB" }, { "local": "deployment-codegen:latest", "name": "codegen", "size": "5.6GB" } ], "heavy": [ { "local": "metabuilder/base-conan-deps:latest", "name": "base-conan-deps", "size": "32GB" }, { "local": "metabuilder/devcontainer:latest", "name": "devcontainer", "size": "41GB" } ], "heavy_apps": [ { "local": "deployment-media-daemon:latest", "name": "media-daemon", "size": "3.5GB" } ] }, "npm_patches": { "registry": ["minimatch@10.2.4", "tar@7.5.11"], "local": [ { "name": "@esbuild-kit/core-utils", "version": "3.3.3-metabuilder.0", "tarball": "esbuild-kit-core-utils-3.3.3-metabuilder.0.tgz" } ] }, "external_images": { "core": [ "postgres:15-alpine", "redis:7-alpine", "docker.elastic.co/elasticsearch/elasticsearch:8.11.0", "mysql:8.0", "mongo:7.0", "phpmyadmin:latest", "mongo-express:latest", "redis/redisinsight:latest", "docker.elastic.co/kibana/kibana:8.11.0", "boky/postfix:latest", "nginx:alpine" ], "monitoring": [ "prom/prometheus:latest", "grafana/grafana:latest", "grafana/loki:latest", "grafana/promtail:latest", "prom/node-exporter:latest", "prometheuscommunity/postgres-exporter:latest", "oliver006/redis_exporter:latest", "gcr.io/cadvisor/cadvisor:latest", "prom/alertmanager:latest" ], "media": ["libretime/icecast:2.4.4"], "build_bases": ["node:20-alpine", "node:24-alpine", "python:3.11-slim", "python:3.12-slim", "alpine:3.19"] } }, "commands": { "build": { "help": "Build Docker images", "subcommands": { "base": { "help": "Build base Docker images", "module": "cli.build_base", "arguments": [ { "name": "--force", "action": "store_true", "help": "Rebuild even if images exist" }, { "name": "--list", "action": "store_true", "help": "List available base images" }, { "name": "images", "nargs": "*", "help": "Images to build (default: all)" } ] }, "apps": { "help": "Build application Docker images", "module": "cli.build_apps", "arguments": [ { "name": "--force", "action": "store_true", "help": "Rebuild even if images exist" }, { "name": "--sequential", "action": "store_true", "help": "Build sequentially (less RAM)" }, { "name": "apps", "nargs": "*", "help": "Apps to build (default: all)" } ] }, "testcontainers": { "help": "Build testcontainers Conan packages", "module": "cli.build_testcontainers", "arguments": [ { "name": "--skip-native", "action": "store_true", "help": "Skip C shared library" }, { "name": "--skip-sidecar", "action": "store_true", "help": "Skip Go sidecar" } ] } } }, "deploy": { "help": "Build + deploy app(s)", "module": "cli.deploy", "arguments": [ { "name": "apps", "nargs": "*", "help": "Apps to deploy" }, { "name": "--all", "action": "store_true", "help": "Deploy all apps" }, { "name": "--no-cache", "action": "store_true", "help": "Build without Docker cache" } ] }, "stack": { "help": "Manage the full MetaBuilder stack", "module": "cli.stack", "arguments": [ { "name": "command", "nargs": "?", "default": "up", "help": "Stack command (default: up)" }, { "name": "--monitoring", "action": "store_true", "help": "Include monitoring services" }, { "name": "--media", "action": "store_true", "help": "Include media services" }, { "name": "--all", "action": "store_true", "dest": "all_profiles", "help": "Include all profiles" } ] }, "release": { "help": "Bump version, commit, push, and deploy", "module": "cli.release", "arguments": [ { "name": "app", "help": "App to release" }, { "name": "bump", "nargs": "?", "default": "patch", "help": "patch, minor, major, or x.y.z" } ] }, "nexus": { "help": "Nexus registry management", "subcommands": { "init": { "help": "Initialize Nexus repositories", "module": "cli.nexus_init", "arguments": [ { "name": "--ci", "action": "store_true", "help": "Lightweight CI init (npm repos only)" } ] }, "push": { "help": "Push images to Nexus", "module": "cli.nexus_push", "arguments": [ { "name": "--tag", "help": "Image tag (default: current git branch)" }, { "name": "--src", "default": "ghcr.io", "help": "Source registry" }, { "name": "--pull", "action": "store_true", "help": "Pull from remote first" } ] }, "populate": { "help": "Push all images to Nexus with :main + :latest tags", "module": "cli.nexus_populate", "arguments": [ { "name": "--skip-heavy", "action": "store_true", "help": "Skip conan-deps, devcontainer, media-daemon" } ] } } }, "npm": { "help": "npm patch management", "subcommands": { "publish-patches": { "help": "Publish patched npm packages to local registry", "module": "cli.npm_patches", "arguments": [ { "name": "--nexus", "action": "store_true", "help": "Force Nexus on :8091" }, { "name": "--verdaccio", "action": "store_true", "help": "Force Verdaccio on :4873" } ] } } }, "artifactory": { "help": "Artifactory management", "subcommands": { "init": { "help": "Initialize Artifactory CE Conan repositories", "module": "cli.artifactory_init", "arguments": [] } } } } }