Skip to content

Commit

Permalink
fix(ci): switch to upstream ps-http-sim from our fork (#4983)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aqrln authored Aug 20, 2024
1 parent c356d1b commit b5beb48
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docker/planetscale_proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM golang:1
FROM ghcr.io/mattrobenolt/ps-http-sim:v0.0.9 AS planetscale-proxy

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

ENTRYPOINT /go/bin/ps-http-sim \
-http-addr=0.0.0.0 \
-http-port=8085 \
COPY --from=planetscale-proxy /ps-http-sim /ps-http-sim

ENTRYPOINT /ps-http-sim \
-listen-addr=0.0.0.0 \
-listen-port=8085 \
-mysql-addr=$MYSQL_HOST \
-mysql-port=$MYSQL_PORT \
-mysql-idle-timeout=1s \
Expand Down

0 comments on commit b5beb48

Please sign in to comment.