Browse Source
Merge pull request #72 from flipped-aurora/gin-vue-admin_v2_dev
Merge pull request #72 from flipped-aurora/gin-vue-admin_v2_dev
Gin vue admin v2 devmain
rainyan
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 235 additions and 203 deletions
-
37server/Dockerfile
-
5server/api/v1/exa_file_upload_download.go
-
7server/api/v1/sys_user.go
-
7server/config.yaml
-
2server/config/config.go
-
4server/initialize/mysql.go
-
20server/utils/upload.go
-
138web/src/view/example/upload/upload.vue
-
110web/src/view/login/login.vue
@ -1,26 +1,21 @@ |
|||
FROM centos:7.6.1810 |
|||
FROM golang:alpine as builder |
|||
RUN apk add --update --no-cache yarn make g++ |
|||
|
|||
# 设置go mod proxy 国内代理 |
|||
# 设置golang path |
|||
ENV GOPROXY=https://goproxy.io GOPATH=/gopath PATH="${PATH}:/usr/local/go/bin" |
|||
# 定义使用的Golang 版本 |
|||
ARG GO_VERSION=1.13.3 |
|||
ENV GOPROXY=https://goproxy.cn,https://goproxy.io,direct \ |
|||
GO111MODULE=on \ |
|||
CGO_ENABLED=1 |
|||
WORKDIR /go/src/gin-vue-admin |
|||
RUN go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct |
|||
COPY . . |
|||
RUN go env && go list && go build -v -a -ldflags "-extldflags \"-static\" " -o gvadmin . |
|||
|
|||
# 安装 golang 1.13.3 |
|||
RUN yum install -y wget && \ |
|||
yum install -y wqy-microhei-fonts wqy-zenhei-fonts && \ |
|||
wget "https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz" && \ |
|||
rm -rf /usr/local/go && \ |
|||
tar -C /usr/local -xzf "go$GO_VERSION.linux-amd64.tar.gz" && \ |
|||
rm -rf *.tar.gz && \ |
|||
go version && go env; |
|||
|
|||
|
|||
WORKDIR $GOPATH |
|||
COPY . gin-vue |
|||
|
|||
RUN cd gin-vue && go build -o app; |
|||
WORKDIR /app |
|||
COPY --from=builder /go/src/gin-vue-admin/gvadmin . |
|||
COPY --from=builder /go/src/gin-vue-admin/db.db . |
|||
COPY --from=builder /go/src/gin-vue-admin/config.yaml . |
|||
COPY --from=builder /go/src/gin-vue-admin/resource ./resource |
|||
|
|||
EXPOSE 8888 |
|||
|
|||
CMD ["gin-vue/app"] |
|||
CMD ["gvadmin/app"] |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue