{"id":19614800,"url":"https://github.com/leancloud/resty-marathon-lb","last_synced_at":"2025-04-28T01:32:18.319Z","repository":{"id":66228619,"uuid":"87699684","full_name":"leancloud/resty-marathon-lb","owner":"leancloud","description":"基于 OpenResty 的 Marathon 服务发现 \u0026 路由","archived":false,"fork":false,"pushed_at":"2017-04-09T11:02:07.000Z","size":17,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T04:51:18.397Z","etag":null,"topics":["marathon","marathon-lb","mesos","openresty"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/leancloud.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-09T10:11:51.000Z","updated_at":"2024-04-28T22:57:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"61529e46-5e22-425a-8e22-a54dad7c0ea9","html_url":"https://github.com/leancloud/resty-marathon-lb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fresty-marathon-lb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fresty-marathon-lb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fresty-marathon-lb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancloud%2Fresty-marathon-lb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leancloud","download_url":"https://codeload.github.com/leancloud/resty-marathon-lb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251234149,"owners_count":21556789,"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","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":["marathon","marathon-lb","mesos","openresty"],"created_at":"2024-11-11T10:53:49.330Z","updated_at":"2025-04-28T01:32:18.311Z","avatar_url":"https://github.com/leancloud.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# resty-marathon-lb\n\n## 这是啥玩意\n\n这是一个 LeanCloud 维护的基于 OpenResty 的服务发现路由。\n在 nginx 配置里说明要 proxy_pass 的 Marathon 应用，就可以直接路由过去了。\n\n```nginx\nserver {\n    listen 80;\n    server_name example.com;\n    location / {\n        dyups_interface;\n        # \"marathon-rest-api地址#应用id:应用端口\"\n        set $marathon_app \"marathon:8080#your-awesome-app:4000\";\n        set $upstream \"\";\n        access_by_lua_file \"lua/marathon-app.lua\";\n        proxy_pass http://$upstream;\n    }\n}\n```\n\n```bash\n$ curl http://example.com/ping\nThis is your awesome app serving at port 23745 (a Mesos allocated port)\n```\n\n## 怎么用\n\n看看 `nginx.conf` 和 `components.conf`。\n通过 `build.sh` 可以构建出一个 docker 镜像，用这个部署就可以了。\n可以直接用 `--net=host` 来部署，会暴露4个端口：\n- 80 HTTP\n- 880 接受 Proxy Protocol 的 HTTP\n- 443 HTTPS\n- 8443 接受 Proxy Protocol 的 HTTPS\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancloud%2Fresty-marathon-lb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleancloud%2Fresty-marathon-lb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancloud%2Fresty-marathon-lb/lists"}