mirror of
https://git.koehn.com/docker/postgres-wal-g.git
synced 2026-11-25 17:43:20 -06:00
Compare commits
42
Commits
v1.1-9
...
15.2-v2.0.1-9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6ca092a14 | ||
|
|
90ad5e4126 | ||
|
|
a6e6872913 | ||
|
|
b6a266eeb3 | ||
|
|
28b4645545 | ||
|
|
b89fdb75cb | ||
|
|
93013a5b39 | ||
|
|
20b012a6a0 | ||
|
|
83fa1e24a6 | ||
|
|
36f146a58f | ||
|
|
caf5c50aa6 | ||
|
|
c0dabcc230 | ||
|
|
192afe1453 | ||
|
|
69f99303d4 | ||
|
|
ef80955920 | ||
|
|
2ae1d24f9a | ||
|
|
2b8df13fda | ||
|
|
c1346e5f41 | ||
|
|
2f98080099 | ||
|
|
acadcd0db6 | ||
|
|
0670df99dc | ||
|
|
9af7b9169d | ||
|
|
f2fa1d42d6 | ||
|
|
4666db46fc | ||
|
|
6565723c06 | ||
|
|
a4ca8d4b45 | ||
|
|
25642d5ed8 | ||
|
|
ac557f48c2 | ||
|
|
9fdba2423e | ||
|
|
3adadf55b3 | ||
|
|
5b3cd141cb | ||
|
|
2f6dc3a509 | ||
|
|
21c53dc4dd | ||
|
|
f2ef1c9d00 | ||
|
|
4b02d05230 | ||
|
|
2d1dea3953 | ||
|
|
7936f2a660 | ||
|
|
f884fca8d3 | ||
|
|
808d390383 | ||
|
|
888a8e06bf | ||
|
|
8e6481be9b | ||
|
|
a8028d9962 |
No files matched your search
+2
-2
@@ -3,11 +3,11 @@ stages:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
timeout: 3h
|
||||||
image:
|
image:
|
||||||
name: moby/buildkit:latest
|
name: moby/buildkit:latest
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- buildkitd &
|
|
||||||
- |
|
- |
|
||||||
mkdir /root/.docker
|
mkdir /root/.docker
|
||||||
cat > /root/.docker/config.json <<EOF
|
cat > /root/.docker/config.json <<EOF
|
||||||
@@ -23,7 +23,7 @@ build:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
- buildctl 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.0-$CI_COMMIT_TAG,push=true --opt build-arg:BASE=14.0 --opt 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:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
pipeline:
|
||||||
|
build-image:
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
secrets: [ docker_username, docker_password ]
|
||||||
|
settings:
|
||||||
|
repo: koehn/postgres-wal-g
|
||||||
|
tag: ${CI_COMMIT_TAG}
|
||||||
|
platforms: linux/amd64
|
||||||
|
mtu: 1300
|
||||||
|
build_args:
|
||||||
|
- BASE=${CI_COMMIT_TAG:0:4}
|
||||||
|
- WALG_RELEASE=${CI_COMMIT_TAG:5:6}
|
||||||
|
|
||||||
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
ARG BASE
|
ARG BASE
|
||||||
|
|
||||||
FROM golang:1.15 as build
|
FROM golang:1 as build
|
||||||
|
|
||||||
ARG WALG_RELEASE=v1.0
|
ARG WALG_RELEASE=v1.1
|
||||||
|
|
||||||
RUN apt-get update -qq && apt-get install -qqy --no-install-recommends --no-install-suggests cmake liblzo2-dev libsodium23 && \
|
RUN apt-get update && apt-get install -qqy --no-install-recommends --no-install-suggests cmake liblzo2-dev libsodium23 libsodium-dev && \
|
||||||
cd /go/src/ && \
|
cd /go/src/ && \
|
||||||
git clone -b $WALG_RELEASE --recurse-submodules https://github.com/wal-g/wal-g.git && \
|
git clone -b $WALG_RELEASE --recurse-submodules https://github.com/wal-g/wal-g.git && \
|
||||||
cd wal-g && \
|
cd wal-g && \
|
||||||
@@ -15,7 +15,7 @@ FROM postgres:$BASE
|
|||||||
|
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||||
apt-get update -qq && \
|
apt-get update && \
|
||||||
apt-get install -qqy curl ca-certificates libsodium23 vim
|
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 --from=build /go/src/wal-g/main/pg/wal-g /usr/local/bin/wal-g
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
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,8 +1,10 @@
|
|||||||
|
[](https://woodpecker.koehn.com/docker/postgres-wal-g)
|
||||||
|
|
||||||
# Postgres WAL-G
|
# Postgres WAL-G
|
||||||
|
|
||||||
This image extends the stock [Postgres Image](https://hub.docker.com/_/postgres/)
|
This image extends the stock [Postgres Image](https://hub.docker.com/_/postgres/)
|
||||||
and adds [WAL-G](https://github.com/wal-g/wal-g) support, along with some
|
and adds [WAL-G](https://github.com/wal-g/wal-g) support, along with some
|
||||||
helpful scripts. It allows you to simply and easily create continuous
|
helpful scripts. It allows you to simply and easily create continuous, encrypted
|
||||||
archives of Postgres databases in S3-compatible storage.
|
archives of Postgres databases in S3-compatible storage.
|
||||||
|
|
||||||
## Environment
|
## Environment
|
||||||
@@ -12,8 +14,9 @@ compatible provider, and set a few environment variables:
|
|||||||
* `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` that can read/write files
|
* `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` that can read/write files
|
||||||
to your bucket
|
to your bucket
|
||||||
* `AWS_ENDPOINT` (et al) to tell WAL-G where to archive (see
|
* `AWS_ENDPOINT` (et al) to tell WAL-G where to archive (see
|
||||||
[WAL-G documentation](https://github.com/wal-g/wal-g) for details)
|
[WAL-G documentation](https://github.com/wal-g/wal-g/blob/master/docs/PostgreSQL.md) for details)
|
||||||
* `WALG_S3_PREFIX` to tell WAL-G which bucket and prefix you'd like to use
|
* `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
|
## Configuration
|
||||||
In your `/var/lib/postgresql/data/pgsql/postgresql.conf` file, set your [archive
|
In your `/var/lib/postgresql/data/pgsql/postgresql.conf` file, set your [archive
|
||||||
@@ -44,5 +47,4 @@ If you start your recovered backup, be sure to turn `archive_mode = off` to avoi
|
|||||||
pushing additional WAL files to S3!
|
pushing additional WAL files to S3!
|
||||||
|
|
||||||
## Postgres Versions
|
## 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
|
Currently I build for Postgres 15, but you can build for whatever version that wal-g supports.
|
||||||
earliest version that WAL-G supports.
|
|
||||||
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
REV=$1
|
# e.g., 14.3
|
||||||
|
PG_VERSION=$1
|
||||||
|
|
||||||
|
#e.g., v2.0.1
|
||||||
|
WALG_VERSION=$2
|
||||||
IMAGE_NAME=koehn/postgres-wal-g
|
IMAGE_NAME=koehn/postgres-wal-g
|
||||||
|
|
||||||
build_image() {
|
build_image() {
|
||||||
BASE=$1
|
BASE=$1
|
||||||
IMAGE=$IMAGE_NAME:$BASE-$REV
|
IMAGE=$IMAGE_NAME:$BASE-$WALG_VERSION
|
||||||
|
docker buildx build --builder k3s-sd -t $IMAGE --push . --build-arg BASE=$PG_VERSION --build-arg WALG_RELEASE=$WALG_VERSION --ulimit memlock=16384:16384
|
||||||
docker build --pull -t "$IMAGE" --build-arg BASE=$BASE .
|
|
||||||
docker push $IMAGE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build_image "11.1" "$REV"
|
build_image "$PG_VERSION" "$WALG_VERSION"
|
||||||
build_image "9.6"
|
|
||||||
|
|
||||||
wait
|
|
||||||
Reference in new issue
Block a user