Skip to content

Commit 56c1c13

Browse files
jolheiserneurosnap
authored andcommitted
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 <[email protected]>
1 parent d8f6347 commit 56c1c13

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Caddyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@
4848
}
4949

5050
:443 {
51-
reverse_proxy web:3000
51+
reverse_proxy git-web:3000
5252
encode zstd gzip
5353
}

Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ENV LDFLAGS="-s -w"
2222

2323
ENV GOOS=${TARGETOS} GOARCH=${TARGETARCH}
2424

25-
RUN go build -ldflags "$LDFLAGS" -o /go/bin/web ./cmd/web
25+
RUN go build -ldflags "$LDFLAGS" -o /go/bin/git-web ./cmd/git-web
2626

2727
FROM builder-deps as builder-ssh
2828

@@ -36,14 +36,14 @@ ENV LDFLAGS="-s -w"
3636

3737
ENV GOOS=${TARGETOS} GOARCH=${TARGETARCH}
3838

39-
RUN go build -ldflags "$LDFLAGS" -o /go/bin/ssh ./cmd/ssh
39+
RUN go build -ldflags "$LDFLAGS" -o /go/bin/git-ssh ./cmd/git-ssh
4040

4141
FROM scratch as release-web
4242

4343
WORKDIR /app
4444

4545
COPY --from=builder-web /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
46-
COPY --from=builder-web /go/bin/web ./web
46+
COPY --from=builder-web /go/bin/git-web ./git-web
4747

4848
CMD ["/app/web"]
4949

@@ -53,6 +53,6 @@ WORKDIR /app
5353
ENV TERM="xterm-256color"
5454

5555
COPY --from=builder-ssh /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
56-
COPY --from=builder-ssh /go/bin/ssh ./ssh
56+
COPY --from=builder-ssh /go/bin/git-ssh ./git-ssh
5757

58-
CMD ["/app/ssh"]
58+
CMD ["/app/git-ssh"]

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ snapshot:
2121
.PHONY: snapshot
2222

2323
build:
24-
go build -o ./build/ssh ./cmd/ssh
25-
go build -o ./build/web ./cmd/web
24+
go build -o ./build/git-ssh ./cmd/git-ssh
25+
go build -o ./build/git-web ./cmd/git-web
2626
.PHONY: build
2727

2828
bp-setup:
File renamed without changes.
File renamed without changes.

docker-compose.prod.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ services:
1919
- "${GITPR_HTTPS_V6:-[::1]:443}:443"
2020
- "${GITPR_HTTP_V6:-[::1]:80}:80"
2121
web:
22-
command: "/app/web --config ${GITPR_CONFIG_PATH}"
22+
command: "/app/git-web --config ${GITPR_CONFIG_PATH}"
2323
networks:
2424
git:
2525
aliases:
2626
- web
2727
env_file:
2828
- .env.prod
2929
ssh:
30-
command: "/app/ssh --config ${GITPR_CONFIG_PATH}"
30+
command: "/app/git-ssh --config ${GITPR_CONFIG_PATH}"
3131
networks:
3232
git:
3333
aliases:

0 commit comments

Comments
 (0)