@@ -873,19 +873,6 @@ ARG supautils_release
873
873
ADD "https://github.com/supabase/supautils/releases/download/v${supautils_release}/supautils-v${supautils_release}-pg${postgresql_major}-${TARGETARCH}-linux-gnu.deb" \
874
874
/tmp/supautils.deb
875
875
876
- ####################
877
- # setup-wal-g.yml
878
- ####################
879
- FROM base as walg
880
- ARG wal_g_release
881
- # ADD "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-18.04-${TARGETARCH}.tar.gz" /tmp/wal-g.tar.gz
882
- RUN arch=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH") && \
883
- apt-get update && apt-get install -y --no-install-recommends curl && \
884
- curl -kL "https://github.com/wal-g/wal-g/releases/download/v${wal_g_release}/wal-g-pg-ubuntu-18.04-${arch}.tar.gz" -o /tmp/wal-g.tar.gz && \
885
- tar -xvf /tmp/wal-g.tar.gz -C /tmp && \
886
- rm -rf /tmp/wal-g.tar.gz && \
887
- mv /tmp/wal-g-pg-ubuntu*18.04-$arch /tmp/wal-g
888
-
889
876
####################
890
877
# Collect extension packages
891
878
####################
@@ -949,7 +936,6 @@ FROM base as production
949
936
950
937
# Setup extensions
951
938
COPY --from=extensions /tmp /tmp
952
- COPY --from=walg /tmp/wal-g /usr/local/bin/
953
939
954
940
ENV DEBIAN_FRONTEND=noninteractive
955
941
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -1016,3 +1002,33 @@ RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccac
1016
1002
cp -r /ccache/* /tmp
1017
1003
FROM scratch as buildcache
1018
1004
COPY --from=stats /tmp /
1005
+
1006
+ FROM ubuntu:bionic as pg_binary_collection_base
1007
+ ENV DEBIAN_FRONTEND=noninteractive
1008
+
1009
+ COPY ansible/files/extensions/* /tmp/build/extensions/
1010
+ COPY ansible/files/postgres/* /tmp/build/
1011
+
1012
+ RUN echo "deb [ trusted=yes ] file:///tmp/build ./" > /etc/apt/sources.list.d/temp.list
1013
+ RUN apt-get update && \
1014
+ apt-get install -y postgresql-${postgresql_major}=${postgresql_release}-1.pgdg18.04+1 --no-install-recommends && \
1015
+ apt-get install -y ca-certificates \
1016
+ libcurl3-gnutls libmecab2 libnghttp2-14 \
1017
+ libpsl5 librtmp1 libsodium23 mecab-naist-jdic \
1018
+ mecab-naist-jdic-eucjp mecab-utils publicsuffix
1019
+ RUN rm -f /tmp/build/extensions/postgis* && \
1020
+ dpkg -i /tmp/build/extensions/*
1021
+
1022
+ FROM ubuntu:bionic as pg_binary_collection
1023
+
1024
+ RUN mkdir -p /tmp/pg_binaries/${postgresql_major}
1025
+ COPY --from=pg_binary_collection_base /usr/lib/postgresql/${postgresql_major} /tmp/pg_binaries/${postgresql_major}
1026
+ COPY --from=pg_binary_collection_base /usr/lib/postgresql/lib /tmp/pg_binaries/${postgresql_major}/lib
1027
+ COPY --from=pg_binary_collection_base /var/lib/postgresql/extension /tmp/pg_binaries/${postgresql_major}/lib
1028
+ COPY --from=pg_binary_collection_base /usr/lib/aarch64-linux-gnu/libpq.so.5 /tmp/pg_binaries/${postgresql_major}/lib
1029
+ COPY --from=pg_binary_collection_base /usr/lib/aarch64-linux-gnu/libpq.so.5 /tmp/pg_binaries/${postgresql_major}/libpq.so.5
1030
+ COPY --from=pg_binary_collection_base /usr/share/postgresql/${postgresql_major} /tmp/pg_binaries/${postgresql_major}/share
1031
+
1032
+ RUN cd /tmp/pg_binaries && \
1033
+ tar czvf 18.04.tar.gz ${postgresql_major}/ && \
1034
+ rm -rf ${postgresql_major}/
0 commit comments