aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/docker-compose.yml10
-rw-r--r--app/postgres/build/postgres/Dockerfile10
-rw-r--r--app/postgres/build/postgres/README.md4
3 files changed, 18 insertions, 6 deletions
diff --git a/app/docker-compose.yml b/app/docker-compose.yml
index 6f68dc5..123c99d 100644
--- a/app/docker-compose.yml
+++ b/app/docker-compose.yml
@@ -90,6 +90,16 @@ services:
VERSION: 3.4.14-0+deb10u1
image: superboum/amd64_postfix:v3
+ postgres:
+ build:
+ args:
+ # https://github.com/sorintlab/stolon/releases
+ STOLON_VERSION: v0.16.0
+ # https://packages.debian.org/fr/stretch/postgresql-all
+ PG_VERSION: 9.6+181+deb9u3
+ context: ./postgres/build/postgres
+ image: superboum/amd64_postgres:v4
+
backup-consul:
build:
context: ./backup/build/backup-consul
diff --git a/app/postgres/build/postgres/Dockerfile b/app/postgres/build/postgres/Dockerfile
index bb018b8..23243aa 100644
--- a/app/postgres/build/postgres/Dockerfile
+++ b/app/postgres/build/postgres/Dockerfile
@@ -1,13 +1,19 @@
FROM amd64/debian:stretch
+ARG STOLON_VERSION
+ARG PG_VERSION
+
RUN echo "deb http://deb.debian.org/debian stretch-backports main contrib non-free # available after stretch release" > /etc/apt/sources.list.d/stretch-backports.list && \
apt-get update && \
apt-get -qq -y full-upgrade && \
- apt-get install -y postgresql-all golang-1.11 git && \
+ apt-get install -y \
+ postgresql-all=${PG_VERSION} \
+ golang-1.11 \
+ git && \
export GOPATH=/usr/local/go && \
mkdir -p /usr/local/go/src/github.com/sorintlab && \
cd /usr/local/go/src/github.com/sorintlab && \
- git clone --depth=1 https://github.com/sorintlab/stolon && \
+ git clone --depth 1 --branch ${STOLON_VERSION} https://github.com/sorintlab/stolon && \
ln -s /usr/lib/go-1.11/bin/go /usr/bin/go && \
ln -s /usr/lib/go-1.11/bin/gofmt /usr/bin/gofmt && \
cd ./stolon && \
diff --git a/app/postgres/build/postgres/README.md b/app/postgres/build/postgres/README.md
deleted file mode 100644
index d2f7a12..0000000
--- a/app/postgres/build/postgres/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-```
-docker build -t superboum/arm32v7_postgres .
-docker build -t superboum/amd64_postgres:v2 .
-```