8000 supabase/postgres Docker version · suryatmodulus/postgres@338380f · GitHub
[go: up one dir, main page]

Skip to content

Commit 338380f

Browse files
committed
supabase/postgres Docker version
1 parent ca0ff49 commit 338380f

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

docker/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM postgres:12
2+
3+
# install postgis
4+
ENV POSTGIS_MAJOR 3
5+
ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg100+1
6+
RUN apt-get update \
7+
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
8+
&& apt-get install -y --no-install-recommends \
9+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
10+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
11+
&& apt-get install software-properties-common -y \
12+
&& apt-get install git -y \
13+
&& apt-get install build-essential -y \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# install pgtap
17+
ENV PGTAP_VERSION v1.1.0
18+
RUN git clone git://github.com/theory/pgtap.git \
19+
&& cd pgtap && git checkout tags/$PGTAP_VERSION \
20+
&& make install
21+
22+
RUN mkdir -p /docker-entrypoint-initdb.d
23+
ADD ./mnt /docker-entrypoint-initdb.d/

docker/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '3'
2+
3+
services:
4+
db:
5+
image: supabase/postgres
6+
ports:
7+
- "6543:5432"
8+
environment:
9+
POSTGRES_PASSWORD: postgres

docker/mnt/init-permissions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "host replication $POSTGRES_USER 0.0.0.0/0 trust" >> $PGDATA/pg_hba.conf
5+
echo "shared_preload_libraries = 'pg_stat_statements'" >> $PGDATA/postgresql.conf
6+
echo "pg_stat_statements.max = 10000" >> $PGDATA/postgresql.conf
7+
echo "pg_stat_statements.track = all" >> $PGDATA/postgresql.conf
8+
echo "wal_level=logical" >> $PGDATA/postgresql.conf

0 commit comments

Comments
 (0)
0