summaryrefslogtreecommitdiff
path: root/build/postgrest
diff options
context:
space:
mode:
Diffstat (limited to 'build/postgrest')
-rw-r--r--build/postgrest/Dockerfile30
-rwxr-xr-xbuild/postgrest/entrypoint.sh21
-rw-r--r--build/postgrest/postgrest.tar.xzbin3648348 -> 0 bytes
3 files changed, 0 insertions, 51 deletions
diff --git a/build/postgrest/Dockerfile b/build/postgrest/Dockerfile
deleted file mode 100644
index bf1a573..0000000
--- a/build/postgrest/Dockerfile
+++ /dev/null
@@ -1,30 +0,0 @@
-FROM alpine:3.19
-
-# install packages
-RUN apk add --no-cache tini shadow
-RUN rm -fr /var/cache/apk/*
-
-# setup main user
-RUN adduser -D postgrest
-RUN groupmod --gid 1000 postgrest
-RUN usermod --uid 1000 postgrest
-
-# install postgrest
-COPY ./postgrest.tar.xz /tmp/postgrest.tar.xz
-RUN tar xJf /tmp/postgrest.tar.xz -C /usr/local/bin
-RUN rm /tmp/postgrest.tar.xz
-
-# copy scripts
-COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
-
-# remove build packages
-RUN apk del shadow
-
-# make the dirs
-RUN mkdir -p /etc/postgrest.d && \
- chown postgrest:postgrest /etc/postgrest.d
-
-# do the
-USER postgrest
-ENTRYPOINT ["/sbin/tini", "--"]
-CMD ["/usr/local/bin/entrypoint.sh"]
diff --git a/build/postgrest/entrypoint.sh b/build/postgrest/entrypoint.sh
deleted file mode 100755
index 71b433d..0000000
--- a/build/postgrest/entrypoint.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-config=/etc/postgrest.d/postgrest.conf
-
-PGRST_DB_URI="postgres://authenticator:postgrest@db:5432/$POSTGRES_DB"
-PGRST_ROLE="rest_anon"
-PGRST_SCHEMA="api"
-
-rm -fr "$config"
-touch "$config"
-{
- printf 'db-uri = "%s"\n' "$PGRST_DB_URI";
- printf 'db-anon-role = "%s"\n' "$PGRST_ROLE";
- printf 'db-schemas = "%s"\n' "$PGRST_SCHEMA";
- printf 'jwt-secret = "%s"\n' "$JWT_SECRET";
- printf 'jwt-secret-is-base64 = false\n';
- printf 'server-host = "*"\n';
- printf 'server-port = 3000\n';
-} >> $config
-
-exec /usr/local/bin/postgrest "$config"
diff --git a/build/postgrest/postgrest.tar.xz b/build/postgrest/postgrest.tar.xz
deleted file mode 100644
index 33c2b2d..0000000
--- a/build/postgrest/postgrest.tar.xz
+++ /dev/null
Binary files differ