Skip to content

Commit

Permalink
Initial Postgres 13 build 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ccakes committed Sep 28, 2020
1 parent 637fe13 commit d457564
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG GO_VERSION=1.13.11
ARG PG_MAJOR=12
ARG TIMESCALEDB_VERSION=1.7.1
ARG PG_MAJOR=13
ARG TIMESCALEDB_VERSION=1.7.4
ARG POSTGIS_MAJOR=3

############################
Expand All @@ -26,7 +26,7 @@ RUN mkdir -p ${GOPATH}/src/github.com/timescale/ \
############################
# Add Timescale, PostGIS and Patroni
############################
FROM postgres:12.4
FROM postgres:13.0
ARG PG_MAJOR
ARG POSTGIS_MAJOR
ARG TIMESCALEDB_VERSION
Expand All @@ -44,16 +44,14 @@ RUN set -x \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
postgis \
postgresql-$PG_MAJOR-cstore-fdw \
postgresql-$PG_MAJOR-pgrouting \
timescaledb-postgresql-$PG_MAJOR \
\
# Install Patroni
&& apt-get install -y --no-install-recommends \
python3 python3-pip python3-setuptools \
&& pip3 install wheel zipp==1.0.0 \
&& pip3 install awscli python-consul psycopg2-binary \
&& pip3 install https://github.com/zalando/patroni/archive/v1.6.5.zip \
&& pip3 install https://github.com/zalando/patroni/archive/v2.0.0.zip \
\
# Install WAL-G
&& curl -LO https://github.com/wal-g/wal-g/releases/download/v0.2.15/wal-g.linux-amd64.tar.gz \
Expand All @@ -76,7 +74,7 @@ RUN set -x \
RUN mkdir -p /docker-entrypoint-initdb.d
COPY ./files/000_shared_libs.sh /docker-entrypoint-initdb.d/000_shared_libs.sh
COPY ./files/001_initdb_postgis.sh /docker-entrypoint-initdb.d/001_initdb_postgis.sh
COPY ./files/002_timescaledb_tune.sh /docker-entrypoint-initdb.d/002_timescaledb_tune.sh
# COPY ./files/002_timescaledb_tune.sh /docker-entrypoint-initdb.d/002_timescaledb_tune.sh

COPY ./files/update-postgis.sh /usr/local/bin
COPY ./files/docker-initdb.sh /usr/local/bin
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ It also contains some helpers for ongoing maintenance
So the same container image can be used in backup jobs
- **WAL-G 0.2.15**<br />
See here for more info - https://github.com/wal-g/wal-g
- **TimescaleDB 1.7.3**<br />
See here for more info - https://github.com/timescale/timescaledb
- **PostGIS 3.0.2**
See here for more info - https://postgis.net/
- **pgRouting 3.1**
See here for more info - https://pgrouting.org/

### Still running Postgres 11?
### A note about TimescaleDB and Postgres 13

See the [`pg-11`](https://github.com/ccakes/nomad-pgsql-patroni/tree/pg-11) branch for a maintained version.
The `pg-11` and `pg-12` branches both contain the TimescaleDB extension however Timescale doesn't yet support Postgres 13. Hopefully [this issue](https://github.com/timescale/timescaledb/issues/2434) will be closed when support is added (maybe in Timescale v2?) and then I'll re-add the extension here.

### Still running Postgres 11 or 12?

See the [`pg-11`](https://github.com/ccakes/nomad-pgsql-patroni/tree/pg-11) or [`pg-12`](https://github.com/ccakes/nomad-pgsql-patroni/tree/pg-12) branch for a maintained version.

## Usage
```hcl
Expand Down Expand Up @@ -59,7 +61,7 @@ EOL
}
config {
image = "ccakes/nomad-pgsql-patroni:12.4-1.tsdb_gis"
image = "ccakes/nomad-pgsql-patroni:13.0-1.gis"
port_map {
pg = 5432
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
# patroni
patroni:
build: .
image: ccakes/nomad-pgsql-patroni:12.4-1.tsdb_gis
image: ccakes/nomad-pgsql-patroni:13.0-1.tsdb_gis
environment:
PGDATA: /alloc/data
ports:
Expand Down
2 changes: 1 addition & 1 deletion example-patroni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bootstrap:
parameters:
timezone: 'UTC'
max_connections: 100
shared_preload_libraries: pg_stat_statements,timescaledb
shared_preload_libraries: pg_stat_statements
shared_buffers: 64MB
work_mem: 16MB
effective_cache_size: 512MB
Expand Down

0 comments on commit d457564

Please sign in to comment.