Gavin 5 年 前
コミット
da6b8bc7c3
4 ファイル変更26 行追加0 行削除
  1. 10 0
      businessapi/Dockerfile
  2. 8 0
      businessapi/agollo.json
  3. BIN
      businessapi/businessapi
  4. 8 0
      businessapi/push.sh

+ 10 - 0
businessapi/Dockerfile

@@ -0,0 +1,10 @@
+FROM golang:1.9.2
+RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
+RUN echo 'Asia/Shanghai' > /etc/timezone
+
+COPY agollo.json /go/bin/
+COPY businessapi /go/bin/
+RUN chmod +x /go/bin/businessapi
+WORKDIR /go/bin
+
+CMD ["/go/bin/businessapi"]

+ 8 - 0
businessapi/agollo.json

@@ -0,0 +1,8 @@
+{
+  "appId": "businessapi",
+  "cluster" : "default",
+  "namespaceNames" : ["businessapi.yaml"],
+  "ip" : "10.68.0.122:8080",
+  "oneNamespaceMode" : true,
+  "tagname" : "yaml"
+}

BIN
businessapi/businessapi


+ 8 - 0
businessapi/push.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+release=$1
+
+[ ! -n "$release" ] && exit 1
+
+docker build -t registry-vpc.cn-beijing.aliyuncs.com/xinyue/businessapi:${release} .
+docker push registry-vpc.cn-beijing.aliyuncs.com/xinyue/businessapi:${release}