Compare commits

...
37 Commits
Author SHA1 Message Date
Brad Koehn 21f3485321 bump to 13.4 2021-08-12 08:42:02 -05:00
Brad Koehn b5dbec4366 got build to work with v1.0 complexities. ouch 2021-05-31 10:50:39 -05:00
Brad Koehn 8af3605145 new filename 2021-05-31 09:11:18 -05:00
Brad Koehn fdb7f1c6bf upgraded wal-g to 1.0 2021-05-31 09:04:32 -05:00
Brad Koehn 6e75b71775 bump postgre 2021-05-13 08:29:22 -05:00
Brad Koehn 80706a20c7 Merge branch 'master' of ssh://gitlab.koehn.com:2201/docker/postgres-wal-g 2021-04-13 15:16:59 -05:00
Brad Koehn 1ca880cf44 bump kaniko 2021-04-13 15:16:47 -05:00
Brad Koehn b66f2886bb Update .gitlab-ci.yml file 2021-02-28 18:00:13 +00:00
Brad Koehn 55b02b6caa wal-g version bump 2020-11-30 08:40:27 -06:00
Brad Koehn 3160eaf1b6 upgrade to pg13.1 2020-11-18 11:14:21 -06:00
Brad Koehn ae5912f70f upgrade to pg13.1 2020-11-18 10:10:36 -06:00
Brad Koehn f648887066 merged 2020-10-12 11:53:57 -05:00
Brad Koehn 4a4d87ba5d added documentation 2020-10-12 10:04:15 -05:00
Brad Koehn 7fa04795a8 Update README.md 2020-09-26 17:51:52 +00:00
Brad Koehn 89f76bb78b pg 13 2020-09-26 07:40:15 -05:00
Brad Koehn 642632c60c postgres 12.4 2020-08-17 13:58:41 -05:00
Brad Koehn f301fad22e version bump 12.3 2020-05-16 06:27:57 -05:00
Brad Koehn 365ef7da9f works with current kaniko and modern docker auth; removed 9.6 build 2020-02-28 10:11:52 -06:00
Brad Koehn ceb542e680 upgraded to support new recovery paradigm in postgres 12; won't work on 9.6 anymore 2020-02-16 08:34:49 -06:00
Brad Koehn 83459c3eee Merge branch 'master' of ssh://gitlab.koehn.com:2201/docker/postgres-wal-g 2019-11-30 12:28:13 -06:00
Brad Koehn e3cee34644 upgraded to 12.1 2019-11-20 12:54:16 -06:00
Brad Koehn 6ce0b371be Update README.md 2019-10-31 19:09:48 +00:00
Brad Koehn f92168528e added support for WALG_RELEASE build arg 2019-10-21 17:23:14 -05:00
Brad Koehn 10af957331 made WAL-G Version an argument 2019-10-21 17:18:34 -05:00
Brad Koehn d8e1e1f39b migrated to postgres 12 builds 2019-10-21 17:17:01 -05:00
Brad Koehn 56aa0e2ca2 upgraded to PG 11.5 2019-08-30 13:37:36 -05:00
Brad Koehn 30f3363b8e Merge branch 'master' of ssh://gitlab.koehn.com:2201/docker/postgres-wal-g 2019-06-11 15:28:25 -05:00
Brad Koehn 72c13d458e Merge branch 'master' of ssh://gitlab.koehn.com:2201/docker/postgres-wal-g 2019-06-11 15:27:58 -05:00
Brad Koehn 6f6dd9bca6 bumped wal-g version 2019-06-10 15:21:52 -05:00
Brad Koehn fc6bb76110 11.3 2019-06-10 12:30:58 -05:00
Brad Koehn d3feaff8e1 Merge branch 'master' of ssh://gitlab.koehn.com:2201/docker/postgres-wal-g 2019-05-13 12:56:14 -05:00
Brad Koehn e779a43c2f Update .gitlab-ci.yml 2019-05-13 17:55:14 +00:00
Brad Koehn cc2096c4b9 upgraded postgres 11 and wal-g 2019-04-16 10:27:15 -05:00
Brad Koehn a554117ba1 upgraded to 11.2 2019-03-04 14:49:41 -06:00
Brad Koehn a08e138569 added gnupg 2019-02-20 13:25:38 -06:00
Brad Koehn 18b0d9b0ee Merge branch 'master' of ssh://gitlab.koehn.com:2201/docker/postgres-wal-g 2019-02-20 12:25:19 -06:00
Brad Koehn 5b59617f84 upgraded wal-g to fix some bugs 2019-02-20 11:33:36 -06:00
7 changed files with 56 additions and 19 deletions

No files matched your search

+17 -15
View File
@@ -1,25 +1,27 @@
stages:
- build
build-9.6:
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
name: gcr.io/kaniko-project/executor:v1.5.2-debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"index.docker.io\":{\"username\":\"$DOCKER_LOGIN\",\"password\":\"$DOCKER_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination koehn/postgres-wal-g:9.6-$CI_COMMIT_TAG --build-arg BASE=9.6
only:
- tags
build-11.1:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"index.docker.io\":{\"username\":\"$DOCKER_LOGIN\",\"password\":\"$DOCKER_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination koehn/postgres-wal-g:11.1-$CI_COMMIT_TAG --build-arg BASE=11.1
- |
cat > /kaniko/.docker/config.json <<EOF
{
"auths": {
"https://index.docker.io/v1/": {
"auth":"${DOCKER_AUTH}"
},
"${CI_REGISTRY}": {
"username": "${CI_REGISTRY_USER}",
"password": "${CI_REGISTRY_PASSWORD}"
}
}
}
EOF
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination koehn/postgres-wal-g:13.4-$CI_COMMIT_TAG --build-arg BASE=13.4 --build-arg WALG_RELEASE=$(echo $CI_COMMIT_TAG | awk -F '-' '{print $1}')
only:
- tags
+15 -2
View File
@@ -1,10 +1,23 @@
ARG BASE
FROM golang:1.15 as build
ARG WALG_RELEASE=v1.0
RUN apt-get update -qq && apt-get install -qqy --no-install-recommends --no-install-suggests cmake liblzo2-dev libsodium23 && \
cd /go/src/ && \
git clone -b $WALG_RELEASE --recurse-submodules https://github.com/wal-g/wal-g.git && \
cd wal-g && \
GOBIN=/go/bin USE_LIBSODIUM=1 USE_LZO=1 make install_and_build_pg
FROM postgres:$BASE
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -qq && \
apt-get install -qqy curl ca-certificates vim && \
cd /usr/local/bin && curl -L https://github.com/wal-g/wal-g/releases/download/v0.2.2/wal-g.linux-amd64.tar.gz | tar xzf -
apt-get install -qqy curl ca-certificates libsodium23 vim
COPY --from=build /go/src/wal-g/main/pg/wal-g /usr/local/bin/wal-g
COPY wal-g /wal-g
+5
View File
@@ -0,0 +1,5 @@
FROM koehn/postgres-wal-g:13.3-v1.0-2
RUN apt-get update -qq && apt-get install -qqy --no-install-recommends postgis postgresql-13-postgis-3
+1 -1
View File
@@ -44,5 +44,5 @@ If you start your recovered backup, be sure to turn `archive_mode = off` to avoi
pushing additional WAL files to S3!
## Postgres Versions
Currently I build for Postgres 9.6 and Postgres 11. Be advised that 9.6 is the
Currently I build for Postgres 13, but you can build for whatever version you'd like. Be advised that 9.6 is the
earliest version that WAL-G supports.
+2
View File
@@ -1,5 +1,7 @@
#!/bin/bash
# A simple script to push a backup of your database.
if [ -z ${PGDATA+x} ]; then
export PGDATA=/var/lib/postgresql/data/pgsql
fi
+1
View File
@@ -10,6 +10,7 @@ export PG_VERSION=$(ls /usr/lib/postgresql/)
# disable recovery mode, re-enable remote connections and archive mode
mv $PGDATA/pg_hba.conf.orig $PGDATA/pg_hba.conf
mv $PGDATA/postgresql.conf.orig $PGDATA/postgresql.conf
sed -i -e 's/^archive_mode = off/archive_mode = on/' $PGDATA/postgresql.conf
cat <<EOF
+15 -1
View File
@@ -1,5 +1,17 @@
#!/bin/bash
# Recovery script:
# * Calls wal-g to recover the latest database
# * Configures postgres to enter recovery mode by:
# * 1. Setting signal
# * 2. Appending wal-g recovery commands onto postgresql.conf
# * 3. Configuring postgres to only allow connections from localhost, preventing concurrent updates
# * 4. Disabling archive mode so as not to corrupt S3 backups
# * Starts postgres
#
# When recovery is done, hit ^C and start database using `/docker-entrypoint.sh postgres` and you should be able to connect to the database and verify backups are OK.
# If you get an error message, DON'T PANIC! Just read the message and do what it tells you to do.
if [ $(id -u) == "0" ] ; then
echo "this command must be run as the postgres user."
exit 1
@@ -15,7 +27,9 @@ fi
wal-g backup-fetch $PGDATA LATEST
# enable recovery mode, disable remote connections and archive mode
cp /wal-g/recovery.conf $PGDATA/
touch $PGDATA/recovery.signal
cp $PGDATA/postgresql.conf $PGDATA/postgresql.conf.orig
cat /wal-g/recovery.conf >> $PGDATA/postgresql.conf
mv $PGDATA/pg_hba.conf $PGDATA/pg_hba.conf.orig
cp /wal-g/pg_hba.conf $PGDATA/pg_hba.conf
sed -i -e 's/^archive_mode = on/archive_mode = off/' $PGDATA/postgresql.conf