mirror of
https://git.koehn.com/docker/postgres-wal-g.git
synced 2026-11-25 17:43:20 -06:00
Compare commits
66
Commits
v1.1-16
...
16.1-v2.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0283464236 | ||
|
|
599b4a7394 | ||
|
|
181d81d8b6 | ||
|
|
fe1d076b54 | ||
|
|
d644e427bf | ||
|
|
2843231ba3 | ||
|
|
d38cf5c191 | ||
|
|
aab6a0cbc3 | ||
|
|
3f5f137aac | ||
|
|
f1b9fe6c8f | ||
|
|
63777d0241 | ||
|
|
ffe01b37ae | ||
|
|
6ccf13f61e | ||
|
|
06627b7c94 | ||
|
|
47a9a80143 | ||
|
|
59d62b6071 | ||
|
|
63e54dbefb | ||
|
|
353e9afdca | ||
|
|
25c88d9aee | ||
|
|
9210fd7661 | ||
|
|
61ff6dd3ea | ||
|
|
2509a90e5e | ||
|
|
e21c44f8cc | ||
|
|
97d2c06256 | ||
|
|
9330274a80 | ||
|
|
9e3a846dc1 | ||
|
|
ff60201d72 | ||
|
|
17c6ecb0d7 | ||
|
|
f888c65103 | ||
|
|
2dbb67d57d | ||
|
|
4821a6be85 | ||
|
|
b4004f97e1 | ||
|
|
d21915e04f | ||
|
|
b1025bf7be | ||
|
|
f49433d3ee | ||
|
|
53618b8e55 | ||
|
|
179daa3d14 | ||
|
|
7fe34cd27c | ||
|
|
7b1cc24f2e | ||
|
|
66d4b429cf | ||
|
|
8d201da1a2 | ||
|
|
226ba8b2d0 | ||
|
|
93013a5b39 | ||
|
|
20b012a6a0 | ||
|
|
83fa1e24a6 | ||
|
|
36f146a58f | ||
|
|
caf5c50aa6 | ||
|
|
c0dabcc230 | ||
|
|
192afe1453 | ||
|
|
69f99303d4 | ||
|
|
ef80955920 | ||
|
|
2ae1d24f9a | ||
|
|
2b8df13fda | ||
|
|
c1346e5f41 | ||
|
|
2f98080099 | ||
|
|
acadcd0db6 | ||
|
|
0670df99dc | ||
|
|
9af7b9169d | ||
|
|
f2fa1d42d6 | ||
|
|
4666db46fc | ||
|
|
6565723c06 | ||
|
|
a4ca8d4b45 | ||
|
|
25642d5ed8 | ||
|
|
ac557f48c2 | ||
|
|
9fdba2423e | ||
|
|
3adadf55b3 |
No files matched your search
@@ -0,0 +1,45 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get Postgres and WAL-G versions
|
||||||
|
env:
|
||||||
|
TAG: ${{ gitea.ref_name }}
|
||||||
|
id: versions
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=postgres::${TAG:0:4}"
|
||||||
|
echo "::set-output name=walg::${TAG:5:6}"
|
||||||
|
|
||||||
|
- name: Install Docker
|
||||||
|
run: curl -fsSL https://get.docker.com | sh
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.koehn.com
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
needs: [versions, ssh]
|
||||||
|
with:
|
||||||
|
build-args: |
|
||||||
|
BASE=${{ steps.versions.outputs.postgres }}
|
||||||
|
WAL_G=${{ steps.versions.outputs.walg }}
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: git.koehn.com/docker/postgres-wal-g:${{ gitea.ref.name }}
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
stages:
|
|
||||||
- build
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
timeout: 3h
|
|
||||||
image:
|
|
||||||
name: moby/buildkit:latest
|
|
||||||
entrypoint: [""]
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
mkdir /root/.docker
|
|
||||||
cat > /root/.docker/config.json <<EOF
|
|
||||||
{
|
|
||||||
"auths": {
|
|
||||||
"https://index.docker.io/v1/": {
|
|
||||||
"auth":"${DOCKER_AUTH}"
|
|
||||||
},
|
|
||||||
"${CI_REGISTRY}": {
|
|
||||||
"username": "${CI_REGISTRY_USER}",
|
|
||||||
"password": "${CI_REGISTRY_PASSWORD}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
- 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
|
|
||||||
|
|
||||||
+5
-5
@@ -1,10 +1,10 @@
|
|||||||
ARG BASE
|
ARG BASE=latest
|
||||||
|
|
||||||
FROM golang:1.15 as build
|
FROM golang:1 as build
|
||||||
|
|
||||||
ARG WALG_RELEASE=v1.0
|
ARG WALG_RELEASE=master
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
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,7 +12,7 @@ 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
|
* `WALG_LIBSODIUM_KEY` to encrypt the files stored in S3
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ To run a full backup, simply run `/wal-g/backup.sh`.
|
|||||||
## Continuous Backups
|
## Continuous Backups
|
||||||
These will happen automatically once you've started Postgres with your edited
|
These will happen automatically once you've started Postgres with your edited
|
||||||
`postgresql.conf` file (see
|
`postgresql.conf` file (see
|
||||||
[Configuration](https://gitlab.koehn.com/docker/postgres-wal-g#configuration), above).
|
[Configuration](#configuration), above).
|
||||||
|
|
||||||
## Recovery
|
## Recovery
|
||||||
Testing recovery is simple: run a new Docker container with the correct
|
Testing recovery is simple: run a new Docker container with the correct
|
||||||
@@ -45,4 +45,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 14, but you can build for whatever version that wal-g supports.
|
Currently I build for Postgres 15, but you can build for whatever 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 -t $IMAGE --push . --build-arg BASE=$PG_VERSION --build-arg WALG_RELEASE=$WALG_VERSION --ulimit memlock=16384:16384 --platform linux/amd64,linux/arm64 --builder multiarch
|
||||||
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