Commit 56c1c13

jolheiser  ·  2025-04-05 20:55:44 -0400 EDT
parent d8f6347
rename binaries

Rename the binaries to avoid any potential for "ssh" (or "web") binaries.
In particular, "ssh" could conflict with openssh and lead to confusing behavior.

Signed-off-by: jolheiser <git@jolheiser.com>
6 files changed,  +10, -10
M Caddyfile
+1, -1
1@@ -48,6 +48,6 @@
2 }
3 
4 :443 {
5-	reverse_proxy web:3000
6+	reverse_proxy git-web:3000
7 	encode zstd gzip
8 }
M Dockerfile
+5, -5
 1@@ -22,7 +22,7 @@ ENV LDFLAGS="-s -w"
 2 
 3 ENV GOOS=${TARGETOS} GOARCH=${TARGETARCH}
 4 
 5-RUN go build -ldflags "$LDFLAGS" -o /go/bin/web ./cmd/web
 6+RUN go build -ldflags "$LDFLAGS" -o /go/bin/git-web ./cmd/git-web
 7 
 8 FROM builder-deps as builder-ssh
 9 
10@@ -36,14 +36,14 @@ ENV LDFLAGS="-s -w"
11 
12 ENV GOOS=${TARGETOS} GOARCH=${TARGETARCH}
13 
14-RUN go build -ldflags "$LDFLAGS" -o /go/bin/ssh ./cmd/ssh
15+RUN go build -ldflags "$LDFLAGS" -o /go/bin/git-ssh ./cmd/git-ssh
16 
17 FROM scratch as release-web
18 
19 WORKDIR /app
20 
21 COPY --from=builder-web /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
22-COPY --from=builder-web /go/bin/web ./web
23+COPY --from=builder-web /go/bin/git-web ./git-web
24 
25 CMD ["/app/web"]
26 
27@@ -53,6 +53,6 @@ WORKDIR /app
28 ENV TERM="xterm-256color"
29 
30 COPY --from=builder-ssh /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
31-COPY --from=builder-ssh /go/bin/ssh ./ssh
32+COPY --from=builder-ssh /go/bin/git-ssh ./git-ssh
33 
34-CMD ["/app/ssh"]
35+CMD ["/app/git-ssh"]
M Makefile
+2, -2
 1@@ -21,8 +21,8 @@ snapshot:
 2 .PHONY: snapshot
 3 
 4 build:
 5-	go build -o ./build/ssh ./cmd/ssh
 6-	go build -o ./build/web ./cmd/web
 7+	go build -o ./build/git-ssh ./cmd/git-ssh
 8+	go build -o ./build/git-web ./cmd/git-web
 9 .PHONY: build
10 
11 bp-setup:
R cmd/ssh/main.go => cmd/git-ssh/main.go
+0, -0
R cmd/web/main.go => cmd/git-web/main.go
+0, -0
M docker-compose.prod.yml
+2, -2
 1@@ -19,7 +19,7 @@ services:
 2       - "${GITPR_HTTPS_V6:-[::1]:443}:443"
 3       - "${GITPR_HTTP_V6:-[::1]:80}:80"
 4   web:
 5-    command: "/app/web --config ${GITPR_CONFIG_PATH}"
 6+    command: "/app/git-web --config ${GITPR_CONFIG_PATH}"
 7     networks:
 8       git:
 9         aliases:
10@@ -27,7 +27,7 @@ services:
11     env_file:
12       - .env.prod
13   ssh:
14-    command: "/app/ssh --config ${GITPR_CONFIG_PATH}"
15+    command: "/app/git-ssh --config ${GITPR_CONFIG_PATH}"
16     networks:
17       git:
18         aliases: