2023-09-28 17:27:34 +03:00
|
|
|
ARG PG_MAIN_VERSION=14
|
|
|
|
|
|
|
|
FROM postgres:${PG_MAIN_VERSION} as postgres
|
|
|
|
|
|
|
|
ARG PG_MAIN_VERSION
|
2023-11-30 17:24:26 +03:00
|
|
|
ARG PG_GRAPHQL_VERSION=1.4.2
|
2023-10-03 17:27:43 +03:00
|
|
|
ARG TARGETARCH
|
|
|
|
|
|
|
|
RUN set -eux; \
|
|
|
|
ARCH="$(dpkg --print-architecture)"; \
|
|
|
|
case "${ARCH}" in \
|
|
|
|
aarch64|arm64) \
|
|
|
|
TARGETARCH='arm64'; \
|
|
|
|
;; \
|
|
|
|
amd64|x86_64) \
|
|
|
|
TARGETARCH='amd64'; \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
echo "Unsupported arch: ${ARCH}"; \
|
|
|
|
exit 1; \
|
|
|
|
;; \
|
|
|
|
esac;
|
2022-12-28 23:19:12 +03:00
|
|
|
|
2023-04-19 14:04:21 +03:00
|
|
|
RUN apt update && apt install -y curl
|
|
|
|
|
2023-09-28 17:27:34 +03:00
|
|
|
# Install precompiled pg_graphql extensions
|
|
|
|
RUN curl -L "https://github.com/supabase/pg_graphql/releases/download/v${PG_GRAPHQL_VERSION}/pg_graphql-v${PG_GRAPHQL_VERSION}-pg${PG_MAIN_VERSION}-${TARGETARCH}-linux-gnu.deb" -o pg_graphql.deb
|
|
|
|
RUN dpkg --install pg_graphql.deb
|
|
|
|
|
2023-04-19 14:04:21 +03:00
|
|
|
COPY init.sql /docker-entrypoint-initdb.d/
|