From 97f51e8cfcbf956d8ba9df55e45645fdfc42bd2e Mon Sep 17 00:00:00 2001 From: SliverHorn Date: Mon, 8 Mar 2021 12:53:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dv2.4.0=E7=9A=84docker-compose?= =?UTF-8?q?=E7=9A=84=E5=90=AF=E5=8A=A8=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .docker-compose/shell/server-handle.sh | 10 +++++----- docker-compose.yaml | 2 +- dockerfile_server | 5 +---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.docker-compose/shell/server-handle.sh b/.docker-compose/shell/server-handle.sh index 1b53cf5d..46cec0fc 100644 --- a/.docker-compose/shell/server-handle.sh +++ b/.docker-compose/shell/server-handle.sh @@ -61,11 +61,11 @@ captcha: # mysql connect configuration mysql: - path: '177.7.0.13:3306' - config: 'charset=utf8mb4&parseTime=True&loc=Local' - db-name: 'qmPlus' - username: 'root' - password: 'Aa@6447985' + path: '' + config: '' + db-name: '' + username: '' + password: '' max-idle-conns: 10 max-open-conns: 100 log-mode: false diff --git a/docker-compose.yaml b/docker-compose.yaml index b78711fc..d997d799 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3.8" +version: "3" networks: network: diff --git a/dockerfile_server b/dockerfile_server index 9cba8a42..54d23dda 100644 --- a/dockerfile_server +++ b/dockerfile_server @@ -12,20 +12,17 @@ RUN sh ./server-handle.sh RUN rm -f server-handle.sh RUN cat ./config.yaml -RUN go build -o gva cmd/main.go RUN go env && go build -o server . - FROM alpine:latest LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com" WORKDIR /go/src/gin-vue-admin -COPY --from=0 /go/src/gin-vue-admin/gva ./ COPY --from=0 /go/src/gin-vue-admin/server ./ COPY --from=0 /go/src/gin-vue-admin/config.yaml ./ COPY --from=0 /go/src/gin-vue-admin/resource ./resource EXPOSE 8888 -ENTRYPOINT ./gva initdb && ./server +ENTRYPOINT ./server