作者 陈志颖

fix:修改日志文件目录

@@ -24,3 +24,4 @@ @@ -24,3 +24,4 @@
24 opp 24 opp
25 /vendor 25 /vendor
26 /*.exe~ 26 /*.exe~
  27 +logs
1 -#FROM golang:1.14  
2 -#ENV APP_DIR $GOPATH/src/partner  
3 -#RUN mkdir -p $APP_DIR  
4 -#WORKDIR $APP_DIR/  
5 -#COPY ./pkg pkg  
6 -#COPY ./conf conf  
7 -#COPY ./go.mod go.mod  
8 -#COPY ./main.go main.go  
9 -#RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]  
10 -#ENV GO111MODULE on  
11 -#ENV GOPROXY https://goproxy.cn,direct  
12 -#RUN ["go","mod","tidy"]  
13 -#RUN ["go","build"]  
14 -#EXPOSE 8082  
15 -#ENTRYPOINT ["./partner"]  
16 -  
17 -############################  
18 -# STEP 1 build executable binary  
19 -############################  
20 -FROM golang:alpine AS builder  
21 -  
22 -RUN mkdir /app  
23 -COPY . /app  
24 -WORKDIR /app  
25 -#RUN GO111MODULE="on" GOPROXY="https://goproxy.cn" GOFLAGS="-mod=vendor" CGO_ENABLED=0 GOOS=linux go build -o partner  
26 -RUN GO111MODULE="on" GOPROXY="https://goproxy.cn" CGO_ENABLED=0 GOOS=linux go build -o partner 1 +FROM golang:1.14
  2 +ENV APP_DIR $GOPATH/src/partner
  3 +RUN mkdir -p $APP_DIR
  4 +WORKDIR $APP_DIR/
  5 +COPY ./pkg pkg
  6 +COPY ./conf conf
  7 +COPY ./go.mod go.mod
  8 +COPY ./main.go main.go
  9 +RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
  10 +ENV GO111MODULE on
  11 +ENV GOPROXY https://goproxy.cn,direct
  12 +RUN ["go","mod","tidy"]
  13 +RUN ["go","build"]
  14 +EXPOSE 8082
  15 +ENTRYPOINT ["./partner"]
27 16
  17 +#############################
  18 +## STEP 1 build executable binary
  19 +#############################
  20 +#FROM golang:alpine AS builder
  21 +#
  22 +#RUN mkdir /app
  23 +#WORKDIR /app
  24 +#COPY . /app
  25 +#RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
  26 +##RUN GO111MODULE="on" GOPROXY="https://goproxy.cn" GOFLAGS="-mod=vendor" CGO_ENABLED=0 GOOS=linux go build -o partner
  27 +#RUN GO111MODULE="on" GOPROXY="https://goproxy.cn" CGO_ENABLED=0 GOOS=linux go build -o partner
  28 +#
  29 +#############################
  30 +## STEP 2 build a small image
28 ############################ 31 ############################
29 -# STEP 2 build a small image  
30 -###########################  
31 -FROM scratch as final  
32 -COPY --from=builder /app/partner /app/partner  
33 -COPY --from=builder /app/conf/ /app/conf  
34 -ENTRYPOINT ["./app/partner"]  
  32 +#FROM scratch as final
  33 +#COPY --from=builder /app/partner /app/partner
  34 +#COPY --from=builder /app/conf/ /app/conf
  35 +#ENTRYPOINT ["./app/partner"]
  1 +-----BEGIN CERTIFICATE-----
  2 +MIIGWjCCBUKgAwIBAgIQBKNf6ftifrIH+BeJ7V4uqjANBgkqhkiG9w0BAQsFADBf
  3 +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
  4 +d3cuZGlnaWNlcnQuY29tMR4wHAYDVQQDExVHZW9UcnVzdCBDTiBSU0EgQ0EgRzEw
  5 +HhcNMjEwMTA2MDAwMDAwWhcNMjIwMjA2MjM1OTU5WjCBgzELMAkGA1UEBhMCQ04x
  6 +EjAQBgNVBAgMCeemj+W7uuecgTESMBAGA1UEBwwJ56aP5bee5biCMTAwLgYDVQQK
  7 +DCfnpo/lu7rkubDkubDkubDkv6Hmga/np5HmioDmnInpmZDlhazlj7gxGjAYBgNV
  8 +BAMMESouZmptYWltYWltYWkuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
  9 +CgKCAQEAv1KDwfoVuXyMSNUvLapWLpyWdQd8Dy4l5Wmdiydof4+ijqCfgPgMOZGS
  10 +7ucvis1Z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  22 +9DCdBnghNwgTPk/hYv0YkCyN2ILO/N18qxdDTFTySG9cLMzHknKpv2aENf0mgiRj
  23 ++T0eSNKM1yFBPktnZvGJ7+gQ3+8fpzudMDyplh6jFFNMJFERzIH2qfoTvAiRwb5U
  24 +B/c4jOUCgYEAiQOXabnrnOvkfhl/RhH/WVeLs6O3c5yei0THysGc+9CqE8txnWPN
  25 +A4XI8Tu8G2ScBN+v9oPFWlLAZxbxh1m6RM6VwP4q+Y8fmdQ+d6gH/IKTdBjH7bOt
  26 +4SHS+t8Z6PSu8K1BsF3pGRS7OWPlivSJzRyP2YIgE/xtwsEqiODdRKM=
  27 +-----END RSA PRIVATE KEY-----
不能预览此文件类型
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 const SERVICE_NAME = "partner" 8 const SERVICE_NAME = "partner"
9 9
10 var LOG_LEVEL = "debug" 10 var LOG_LEVEL = "debug"
11 -var LOG_File = "app.log" 11 +var LOG_File = "logs/app.log"
12 var LOG_PREFIX = "[partner_dev]" 12 var LOG_PREFIX = "[partner_dev]"
13 13
14 var MMM_SMS_SERVICE_HOST = "https://sms.fjmaimaimai.com:9897" 14 var MMM_SMS_SERVICE_HOST = "https://sms.fjmaimaimai.com:9897"
@@ -2,9 +2,9 @@ package constant @@ -2,9 +2,9 @@ package constant
2 2
3 import "os" 3 import "os"
4 4
5 -var REDIS_HOST = "127.0.0.1" 5 +var REDIS_HOST = "192.168.100.6"
6 var REDIS_PORT = "6379" 6 var REDIS_PORT = "6379"
7 -var REDIS_AUTH = "" 7 +var REDIS_AUTH = "1993618@jack"
8 8
9 func init() { 9 func init() {
10 if os.Getenv("REDIS_HOST") != "" { 10 if os.Getenv("REDIS_HOST") != "" {