From 5fdb171d6564388f101fd562772741ffa7ba65d0 Mon Sep 17 00:00:00 2001 From: yusing Date: Mon, 4 Nov 2024 03:47:37 +0800 Subject: [PATCH] rebrand changed startup message, built script and Dockerfile --- Dockerfile | 6 +++--- Makefile | 6 +++--- cmd/main.go | 2 +- compose.example.yml | 4 ++-- scripts/build.sh | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index af1f332..a9b1798 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN --mount=type=cache,target="/go/pkg/mod" \ --mount=type=bind,src=pkg,dst=/src/pkg \ make build && \ mkdir -p /app/error_pages /app/certs && \ - mv bin/go-proxy /app/go-proxy + mv bin/godoxy /app/godoxy # Stage 2: Final image FROM scratch @@ -50,7 +50,7 @@ COPY config.example.yml /app/config/config.yml COPY --from=builder /etc/ssl/certs /etc/ssl/certs ENV DOCKER_HOST=unix:///var/run/docker.sock -ENV GOPROXY_DEBUG=0 +ENV GODOXY_DEBUG=0 EXPOSE 80 EXPOSE 8888 @@ -58,4 +58,4 @@ EXPOSE 443 WORKDIR /app -CMD ["/app/go-proxy"] +CMD ["/app/godoxy"] diff --git a/Makefile b/Makefile index 7f3621b..e740b31 100755 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ build: scripts/build.sh test: - GOPROXY_TEST=1 go test ./internal/... + GODOXY_TEST=1 go test ./internal/... up: docker compose up -d @@ -28,10 +28,10 @@ get: go get -u ./cmd && go mod tidy debug: - GOPROXY_DEBUG=1 make run + GODOXY_DEBUG=1 make run debug-trace: - GOPROXY_DEBUG=1 GOPROXY_TRACE=1 run + GODOXY_DEBUG=1 GODOXY_TRACE=1 run profile: GODEBUG=gctrace=1 make debug diff --git a/cmd/main.go b/cmd/main.go index 764a723..f658e7c 100755 --- a/cmd/main.go +++ b/cmd/main.go @@ -62,7 +62,7 @@ func main() { } if args.Command == common.CommandStart { - logging.Info().Msgf("go-proxy version %s", pkg.GetVersion()) + logging.Info().Msgf("GoDoxy version %s", pkg.GetVersion()) logging.Trace().Msg("trace enabled") // logging.AddHook(notif.GetDispatcher()) } else { diff --git a/compose.example.yml b/compose.example.yml index 8025a00..2974382 100755 --- a/compose.example.yml +++ b/compose.example.yml @@ -2,7 +2,7 @@ services: frontend: image: ghcr.io/yusing/go-proxy-frontend:latest - container_name: go-proxy-frontend + container_name: godoxy-frontend restart: unless-stopped network_mode: host env_file: .env @@ -21,7 +21,7 @@ services: - 172.16.0.0/12 app: image: ghcr.io/yusing/go-proxy:latest - container_name: go-proxy + container_name: godoxy restart: always network_mode: host env_file: .env diff --git a/scripts/build.sh b/scripts/build.sh index 850ed8a..c71e429 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,4 +2,4 @@ mkdir -p bin echo building GoDoxy version ${VERSION}, build flags \"${BUILD_FLAGS}\" -go build -ldflags "${BUILD_FLAGS}" -pgo=auto -o bin/go-proxy ./cmd +go build -ldflags "${BUILD_FLAGS}" -pgo=auto -o bin/godoxy ./cmd