{"id":20430942,"url":"https://github.com/xwi88/go-demo-gin","last_synced_at":"2026-05-01T20:31:52.965Z","repository":{"id":40646996,"uuid":"273653440","full_name":"xwi88/go-demo-gin","owner":"xwi88","description":"go demo with gin, support docker and docker-compose","archived":false,"fork":false,"pushed_at":"2020-06-22T07:14:09.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T05:44:15.460Z","etag":null,"topics":["docker","docker-compose","go","golang","makefile"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xwi88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-20T06:40:11.000Z","updated_at":"2022-06-27T08:48:24.000Z","dependencies_parsed_at":"2022-09-18T15:21:20.067Z","dependency_job_id":null,"html_url":"https://github.com/xwi88/go-demo-gin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xwi88/go-demo-gin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fgo-demo-gin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fgo-demo-gin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fgo-demo-gin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fgo-demo-gin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwi88","download_url":"https://codeload.github.com/xwi88/go-demo-gin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fgo-demo-gin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["docker","docker-compose","go","golang","makefile"],"created_at":"2024-11-15T08:09:43.471Z","updated_at":"2026-05-01T20:31:52.944Z","avatar_url":"https://github.com/xwi88.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-demo-gin\n\ngo demo with gin, support docker and docker-compose\n\n## Env\n\n- go1.14.4+\n- platform: Linux|Unix|Mac OS\n\n\u003eGO Proxy 配置\n\n```bash\nexport GOPROXY=https://goproxy.cn,https://goproxy.io/,https://mirrors.aliyun.com/goproxy/,https://gocenter.io/,https://proxy.golang.org,direct\n\n# 私有仓库，公司仓库\nexport GOPRIVATE=*.example.com\n```\n## Compile \u0026 Run\n\n- `make run` or `go build`\n\n\u003e具体命令请参考: `Makefile` 文件\n\n## Docker build \u0026 start\n\n- `make docker`        创建镜像\n- `make docker-start`  镜像启动\n- `make docker-version` 二进制版本 version\n- `bash docker/docker-startup.sh` 镜像启动\n- `docker-compose up` docker-compose 方式启动\n\n## Base docker images\n\n- go源码编译镜像 [v8fg/golang:1.14.4-upx](https://hub.docker.com/repository/docker/v8fg/golang)\n- go二进制运行镜像 [v8fg/alpine](https://hub.docker.com/repository/docker/v8fg/alpine)\n\n### Tip\n\n- *docker-startup.sh* 启动脚本中输入参数，务必使用 $PARAMS 而非 \"$PARAMS\"!\n- $PARAMS 为空，则执行默认命令; 输入 \"$PARAMS\" 可能会被当做 \" \" 参数，会造成未知影响!\n- 使用 `upx` 压缩二进制可执行程序，减小 `image` 或可执行程序大小(30%-50%)，`brew install upx` 安装，执行 `make upx`\n- 测试服务器测试，借助vendor目录加速构建 `make docker-mod`\n\n## Deploy\n\n- **创建镜像** `make docker-build-dev`|`make docker-build-uat`|`make docker-build-prod`\n- **镜像推送** 推送生成的镜像到 *corp* 镜像仓库\n- **镜像使用** 选择要发布的镜像版本，发布即可，默认启动\n- **开发测试部署** `make deploy` 借助 `docker`, `docker-compose`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwi88%2Fgo-demo-gin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwi88%2Fgo-demo-gin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwi88%2Fgo-demo-gin/lists"}