diff --git a/Dockerfile b/Dockerfile index 354e970..b806d54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,9 @@ FROM golang:1.20.7 as builder WORKDIR /go/src/joylink.club/bj-rtsts-server COPY . ./ -RUN pwd && ls -l RUN go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct && go build -o bj-rtsts-server - FROM scratch WORKDIR /bj-rtsts -COPY --from=builder /go/src/joylink.club/bj-rtsts-server/bj-rtsts-server . +COPY --from=builder /go/src/joylink.club/bj-rtsts-server/bj-rtsts-server /go/src/joylink.club/bj-rtsts-server/config.yml ./ CMD [ "bj-rtsts-server" ] \ No newline at end of file diff --git a/xiannccda.setting.yml b/config.yml similarity index 100% rename from xiannccda.setting.yml rename to config.yml diff --git a/config/config.go b/config/config.go index 2f31b93..02a90b4 100644 --- a/config/config.go +++ b/config/config.go @@ -53,7 +53,7 @@ var Config AppConfig // 加载配置 func LoadConfig() { - viper.SetConfigName("xiannccda.setting") + viper.SetConfigName("config") viper.SetConfigType("yml") viper.AddConfigPath("./config/") viper.AddConfigPath(".")