Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
twbworld committed Feb 9, 2024
1 parent a3b8b5b commit 964694a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##编译
FROM --platform=$TARGETPLATFORM golang:1.22 AS builder
FROM --platform=$TARGETPLATFORM golang:1.22-alpine AS builder
WORKDIR /app
ARG TARGETARCH
ENV GO111MODULE=on
Expand All @@ -8,7 +8,7 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . .
#go-sqlite3需要cgo编译; 且使用完全静态编译, 否则需依赖外部安装的glibc
RUN CGO_ENABLED=1 GOOS=linux GOARCH=$TARGETARCH go build -ldflags "-s -w --extldflags '-static -fpic'" -o server . && \
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -ldflags="-s -w" -o server . && \
mv config/.env.example config/clash.ini server /app/static


Expand Down
2 changes: 1 addition & 1 deletion config/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package config

type AppConfig struct {
ProjectName string `default:"VPN会员系统" json:"projectName" info:"本项目名称"`
GinAddr string `default:":8088" json:"ginAddr" info:"gin监听的地址"`
GinAddr string `default:":80" json:"ginAddr" info:"gin监听的地址"`
EnvPath string `default:"config/.env" json:"envPath" info:"敏感配置文件的路径"`
ClashPath string `default:"config/clash.ini" json:"clashPath" info:"clash默认配置文件"`
GinLogPath string `default:"log/gin.log" json:"ginLogPath" info:"gin日志文件"`
Expand Down

0 comments on commit 964694a

Please sign in to comment.