Skip to content

Commit b5beb48

Browse files
authored
fix(ci): switch to upstream ps-http-sim from our fork (prisma#4983)
The upstream project has been revived since we forked it and has had some improvements, including an official Docker image. Our fork stopped compiling with the latest Go version leading to CI failures, so it's a good opportunity to switch to the upstream.
1 parent c356d1b commit b5beb48

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docker/planetscale_proxy/Dockerfile

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
FROM golang:1
1+
FROM ghcr.io/mattrobenolt/ps-http-sim:v0.0.9 AS planetscale-proxy
22

3-
RUN apt update && apt install netcat-openbsd -y
4-
RUN cd /go/src && git clone https://github.com/prisma/planetscale-proxy.git
5-
RUN cd /go/src/planetscale-proxy && go install .
3+
# ps-http-sim provides a barebones image with nothing but the static binary
4+
# but we also rely on netcat being present. Alpine provides it as part of busybox.
5+
FROM alpine:latest
66

7-
ENTRYPOINT /go/bin/ps-http-sim \
8-
-http-addr=0.0.0.0 \
9-
-http-port=8085 \
7+
COPY --from=planetscale-proxy /ps-http-sim /ps-http-sim
8+
9+
ENTRYPOINT /ps-http-sim \
10+
-listen-addr=0.0.0.0 \
11+
-listen-port=8085 \
1012
-mysql-addr=$MYSQL_HOST \
1113
-mysql-port=$MYSQL_PORT \
1214
-mysql-idle-timeout=1s \

0 commit comments

Comments
 (0)