{"id":18262885,"url":"https://github.com/midwayjs/sandbox-docker","last_synced_at":"2025-08-11T17:08:41.626Z","repository":{"id":45242272,"uuid":"152717025","full_name":"midwayjs/sandbox-docker","owner":"midwayjs","description":"一份基于 Docker Compose 的 Sandbox 部署配置","archived":false,"fork":false,"pushed_at":"2021-12-28T16:13:59.000Z","size":589,"stargazers_count":14,"open_issues_count":5,"forks_count":3,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-04T20:36:30.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midwayjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-12T08:16:31.000Z","updated_at":"2022-05-16T14:11:26.000Z","dependencies_parsed_at":"2022-09-09T22:51:05.898Z","dependency_job_id":null,"html_url":"https://github.com/midwayjs/sandbox-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/midwayjs/sandbox-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fsandbox-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fsandbox-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fsandbox-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fsandbox-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midwayjs","download_url":"https://codeload.github.com/midwayjs/sandbox-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fsandbox-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269922906,"owners_count":24496999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:09:10.567Z","updated_at":"2025-08-11T17:08:41.539Z","avatar_url":"https://github.com/midwayjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sandbox-docker\n\n一份基于 Docker Compose 的单机部署的配置。\n\n## 简要说明\n\nCheckout 本项目，并运行如下命令即可启动。\n\n```shell\nsudo docker-compose build \u0026\u0026 sudo docker-compose up\n```\n\n访问 7001 端口即可查看数据。\n\n## 组件介绍\n\n1. /sandbox\n  * Sandbox 监控平台应用程序，其使用 Pandora.js 启动。\n2. /mariadb\n  * MariaDB 的一个实例，用于存储错误日志和链路数据\n  * 配有数据自动清理功能，默认保留 3 天数据\n3. /opentsdb\n  * 用于存储 Metrics 数据\n\n## 如何接入更多应用\n\n应用使用 Pandora.js 启动，并安装 `pandora-component-sandbox-log-hub-reporter`。\n\n并在应用目录增加如下配置：\n\n```javascript\nexports.components = {\n  // 配置使用 LogHub 向 Sandbox 写入数据\n  sandboxLogHubReporter: {\n    path: 'pandora-component-sandbox-log-hub-reporter'\n  },\n  // 打开基于 Patch 和 AsyncHooks 自动获取数据\n  autoPatching: {\n    path: 'pandora-component-auto-patching'\n  }\n};\n\nexports.sandboxLogHubReporter = {\n  // 配置 LogHub 的地址，即 Sandbox 平台的地址\n  endpoint: 'http://127.0.0.1:7001/'\n};\n\nexports.trace = {\n  // 配置链路采样率\n  sampling: 10\n};\n```\n\n然后运行 `pandora start` 即可前台启动应用。然后再等一会，如果没有意外，新应用就会出现在 Sandbox 的应用列表上了。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwayjs%2Fsandbox-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidwayjs%2Fsandbox-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwayjs%2Fsandbox-docker/lists"}