Commit 071c5f59 authored by gaoshiyao's avatar gaoshiyao

update

parent c60b5efd
......@@ -42,15 +42,15 @@ pipeline:
target: REGISTRY_PASSWORD
when:
branch: [master]
# deploy:
# image: registry-vpc.cn-qingdao.aliyuncs.com/wod-devops/kubernetes:1.0
# namespace: apaas
# deployment: apaas-meshproxy
# container: apaas-meshproxy
# registry: hub.wodcloud.com
# secrets:
# - source: KUBERNETES_SERVER
# target: KUBERNETES_SERVER
# - source: KUBERNETES_TOKEN
# target: KUBERNETES_TOKEN
deploy:
image: registry-vpc.cn-qingdao.aliyuncs.com/wod-devops/kubernetes:1.0
namespace: cig
deployment: apaas-meshproxy
container: apaas-meshproxy
registry: hub.wodcloud.com
secrets:
- source: KUBERNETES_SERVER
target: KUBERNETES_SERVER
- source: KUBERNETES_TOKEN
target: KUBERNETES_TOKEN
.vscode
.idea/
vendor
\ No newline at end of file
vendor
__debug_bin
\ No newline at end of file
......@@ -13,9 +13,10 @@ import (
)
var (
argPort = pflag.Int("port", 8088, "")
redisUrl = pflag.String("redisUrl", "redis://redis:16379", "")
redisTag = pflag.String("redisTag", "apaas-mesh-proxy", "")
argPort = pflag.Int("port", 8088, "")
argPrefix = pflag.String("prefix", "/vuemap", "")
redisUrl = pflag.String("redisUrl", "redis://redis:16379", "")
redisTag = pflag.String("redisTag", "apaas-mesh-proxy", "")
)
func main() {
......@@ -24,8 +25,8 @@ func main() {
initConfig()
proxyhandler, _ := handler.CreateProxyHandler()
counthandler, _ := handler.CreateCountHandler()
http.Handle("/count", counthandler)
http.Handle("/", proxyhandler)
http.Handle(fmt.Sprintf("%s%s", *argPrefix, "/count"), counthandler)
http.Handle(*argPrefix+"/", proxyhandler)
if err := http.ListenAndServe(fmt.Sprintf(":%d", *argPort), nil); err != nil {
log.Error("Listen Server err:", err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment