Compare commits

..
28 Commits
Author SHA1 Message Date
Brad Koehn 5b3cd141cb 14.2 2022-02-11 11:55:06 -06:00
Brad Koehn 2f6dc3a509 Merge branch 'bkoehn-master-patch-85483' into 'master'
Update README.md

See merge request docker/postgres-wal-g!1
2021-12-14 16:10:23 +00:00
Brad Koehn 21c53dc4dd Update README.md
Deleted Dockerfile-postgis
2021-12-14 16:09:49 +00:00
Brad Koehn f2ef1c9d00 postgres 14.1 2021-11-26 16:32:39 -06:00
Brad Koehn 4b02d05230 postgres 14 2021-11-26 16:31:33 -06:00
Brad Koehn 2d1dea3953 Update .gitlab-ci.yml 2021-11-11 01:47:59 +00:00
Brad Koehn 7936f2a660 Update .gitlab-ci.yml 2021-11-10 23:56:44 +00:00
Brad Koehn f884fca8d3 build arm64 and amd64 images 2021-11-10 16:18:29 -06:00
Brad Koehn 808d390383 gitlab buildkit tweaks 2021-11-10 16:13:05 -06:00
Brad Koehn 888a8e06bf merged 2021-11-10 15:54:30 -06:00
Brad Koehn 8e6481be9b gitlab buildkit tweaks 2021-11-10 15:32:33 -06:00
Brad Koehn bd622797b1 gitlab buildkit tweaks 2021-11-10 15:30:04 -06:00
Brad Koehn d18b5088ad gitlab buildkit tweaks 2021-11-10 15:26:05 -06:00
Brad Koehn c030b76a4c gitlab buildkit tweaks 2021-11-10 15:23:52 -06:00
Brad Koehn ed3f8308bc gitlab buildkit tweaks 2021-11-10 15:22:29 -06:00
Brad Koehn e5067b4257 trying buildkit 2021-11-10 15:19:27 -06:00
Brad Koehn e34430fd7e kaniko bump 2021-11-02 09:23:52 -05:00
Brad Koehn 67f8f0cb65 downgraded kaniko to avoid OOM issues 2021-10-11 08:12:53 -05:00
Brad Koehn a7020c5d4e upgrade to 14 2021-10-10 14:23:43 -05:00
Brad Koehn a8028d9962 Update README.md 2021-08-20 15:52:46 +00:00
Brad Koehn 99ef19d076 Update .gitlab-ci.yml 2021-08-19 21:50:00 +00:00
Brad Koehn a4118b3a0f merge from master 2021-08-12 08:44:17 -05:00
Brad Koehn 21f3485321 bump to 13.4 2021-08-12 08:42:02 -05:00
Brad Koehn 0b977ac06b Fix a typo. 2021-06-01 13:14:31 +00:00
Brad Koehn 0043e3f3a4 Update README.md archiving link. 2021-06-01 13:11:07 +00: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
3 changed files with 23 additions and 10 deletions

No files matched your search

+5 -3
View File
@@ -3,12 +3,14 @@ stages:
build:
stage: build
timeout: 3h
image:
name: gcr.io/kaniko-project/executor:v1.5.2-debug
name: moby/buildkit:latest
entrypoint: [""]
script:
- |
cat > /kaniko/.docker/config.json <<EOF
mkdir /root/.docker
cat > /root/.docker/config.json <<EOF
{
"auths": {
"https://index.docker.io/v1/": {
@@ -21,7 +23,7 @@ build:
}
}
EOF
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination koehn/postgres-wal-g:13.3-$CI_COMMIT_TAG --build-arg BASE=13.3 --build-arg WALG_RELEASE=$(echo $CI_COMMIT_TAG | awk -F '-' '{print $1}')
- buildctl-daemonless.sh build --frontend=dockerfile.v0 --local context=$CI_PROJECT_DIR --local dockerfile=$CI_PROJECT_DIR --output type=image,name=docker.io/koehn/postgres-wal-g:14.2-$CI_COMMIT_TAG,push=true --opt build-arg:BASE=14.2 --opt build-arg:WALG_RELEASE=$(echo $CI_COMMIT_TAG | awk -F '-' '{print $1}') --opt platform=linux/amd64
only:
- tags
+14 -3
View File
@@ -1,12 +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
ARG WALG_RELEASE=v0.2.19
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -qq && \
apt-get install -qqy curl ca-certificates libsodium23 vim && \
cd /usr/local/bin && curl -L https://github.com/wal-g/wal-g/releases/download/$WALG_RELEASE/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
+4 -4
View File
@@ -14,10 +14,11 @@ to your bucket
* `AWS_ENDPOINT` (et al) to tell WAL-G where to archive (see
[WAL-G documentation](https://github.com/wal-g/wal-g) for details)
* `WALG_S3_PREFIX` to tell WAL-G which bucket and prefix you'd like to use
* `WALG_LIBSODIUM_KEY` to encrypt the files stored in S3
## Configuration
In your `/varlib/postgresql/data/pgsql/postgresql.conf` file, set your [archive
settings](https://www.postgresql.org/docs/9.1/continuous-archiving.html).
In your `/var/lib/postgresql/data/pgsql/postgresql.conf` file, set your [archive
settings](https://www.postgresql.org/docs/current/continuous-archiving.html).
Importantly, you should set `archive_mode = on` and
`archive_command = 'wal-g wal-push %p'`. This will
tell Postgres to have WAL-G send WAL files to S3.
@@ -44,5 +45,4 @@ 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 13, but you can build for whatever version you'd like. Be advised that 9.6 is the
earliest version that WAL-G supports.
Currently I build for Postgres 14, but you can build for whatever version that wal-g supports.