{"id":19249515,"url":"https://github.com/opvexe/sass-web-server","last_synced_at":"2026-04-11T02:45:09.133Z","repository":{"id":99490583,"uuid":"230697296","full_name":"opvexe/sass-web-server","owner":"opvexe","description":"gin写的web项目，包含go-micro ，etcd服务发现,普罗米修斯","archived":false,"fork":false,"pushed_at":"2020-01-21T09:54:34.000Z","size":3666,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-23T04:44:07.039Z","etag":null,"topics":["docker","docker-compose","gin","gorm","mysql"],"latest_commit_sha":null,"homepage":"","language":"Go","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/opvexe.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}},"created_at":"2019-12-29T03:24:44.000Z","updated_at":"2020-11-11T11:10:15.000Z","dependencies_parsed_at":"2023-04-04T14:32:44.008Z","dependency_job_id":null,"html_url":"https://github.com/opvexe/sass-web-server","commit_stats":null,"previous_names":["opvexe/sass-web-server","shumintao/sass-web-server","shumintao/pea-web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opvexe/sass-web-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opvexe%2Fsass-web-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opvexe%2Fsass-web-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opvexe%2Fsass-web-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opvexe%2Fsass-web-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opvexe","download_url":"https://codeload.github.com/opvexe/sass-web-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opvexe%2Fsass-web-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28133000,"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-12-30T02:00:05.476Z","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","gin","gorm","mysql"],"created_at":"2024-11-09T18:14:13.106Z","updated_at":"2025-12-30T22:06:58.340Z","avatar_url":"https://github.com/opvexe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## 1.1docker-compose 安装过程中2.0~3.0存在的问题\n\n![截图](./images/2019-12-20-1.png)\n\n#### 1.1 可能问题 \n\n```shell\nInstalling collected packages: texttable, subprocess32, urllib3, certifi, chardet, idna, requests, websocket-client, pycparser, cffi, bcrypt, pynacl, cryptography, paramiko, docker, backports.shutil-get-terminal-size, docker-compose\n  Found existing installation: texttable 0.8.1\nERROR: Cannot uninstall 'texttable'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.\nSENSETIME\\taoshumin_vend\n```\n\n解决方案:\n\n```shell\n$ sudo pip install docker-compose --ignore -installed request\n```\n\n\n\n#### 1.2 可能存在问题\n\n![截图](./images/2019-12-20-2.png)\n\n```shell\n, line 97, in \u003cmodule\u003e\n    from pip._vendor.urllib3.contrib import pyopenssl\n  File \"/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/contrib/pyopenssl.py\", line 46, in \u003cmodule\u003e\n    import OpenSSL.SSL\n  File \"/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py\", line 8, in \u003cmodule\u003e\n    from OpenSSL import rand, crypto, SSL\n  File \"/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py\", line 118, in \u003cmodule\u003e\n    SSL_ST_INIT = _lib.SSL_ST_INIT\nAttributeError: 'module' object has no attribute 'SSL_ST_INIT'\n```\n\n解决方案:\n\n```shell\n$ rm -rf /usr/lib/python2.7/dist-packages/OpenSSL\n$ rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info\n$ sudo pip install pyopenssl\n```\n\n## 1.2 docker 制作镜像\n\n```shell\n# 制作镜像\n$ docker build -t 镜像名:tag . \n# 运行镜像\n$ docker run -itd --name 容器名 -p 宿主机port:容器port 镜像名\n```\n\n#### 1.2.1 直接删除所有镜像或容器\n\n```shell\n# 直接删除所有镜像\ndocker rmi `docker images -q`\n# 直接删除所有容器\ndocker rm `docker ps -aq`\n\n# 按条件筛选之后删除镜像\ndocker rmi `docker images | grep xxxxx | awk '{print $3}'`\n# 按条件筛选之后删除容器\ndocker rm `docker ps -a | grep xxxxx | awk '{print $1}'`\n```\n\n\n\n\n\n## 1.4 Go [老外的写法]\n\n#### 1.4.1 定时器\n\n```go\nfunc startInternalMetrics(ctx context.Context, wg *sync.WaitGroup, storage *Storage, interval uint) {\n\tvar memstats runtime.MemStats\n\tvar metricsTicker *time.Ticker\n\n\tif interval \u003e 0 {\n\t\tmetricsTicker = time.NewTicker(time.Duration(interval) * time.Second)\n\t} else {\n\t\tmetricsTicker = time.NewTicker(15 * time.Second)\n\t}\n\n\twg.Add(1)\n\tdefer wg.Done()\n\n\tfor {\n\t\tselect {\n\t\tcase \u003c-metricsTicker.C:\n\t\t\truntime.ReadMemStats(\u0026memstats)\n\t\t\tstorage.MetricDistributor \u003c- makeInternalMetric(\"mem.alloc\", float64(memstats.Alloc))\n\t\t\tstorage.MetricDistributor \u003c- makeInternalMetric(\"heap.alloc\", float64(memstats.HeapAlloc))\n\t\t\tstorage.MetricDistributor \u003c- makeInternalMetric(\"heap.in_use\", float64(memstats.HeapInuse))\n\t\t\tstorage.MetricDistributor \u003c- makeInternalMetric(\"num_goroutines\", float64(runtime.NumGoroutine()))\n\n\t\tcase \u003c-ctx.Done():\n\t\t\tlog.Println(\"Cancellation request received.  Cancelling job runner.\")\n\t\t\treturn\n\t\t}\n\t}\n```\n\n#### 1.4.2  [Context传递]\n\n\n```go\nfunc NewJobRunner(ctx context.Context) *JobRunner {\n\tjr := JobRunner{\n\t\tctx: ctx,\n\t}\n\tjr.JobChan = make(chan Job, 10)\n\treturn \u0026jr\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopvexe%2Fsass-web-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopvexe%2Fsass-web-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopvexe%2Fsass-web-server/lists"}