Compare commits

..
66 Commits
Author SHA1 Message Date
Brad Koehn 0283464236 gave up on multi-machine dockerx; fixed docker tag name 2023-11-10 08:11:43 -06:00
Brad Koehn 599b4a7394 setting up key for remote build 2023-11-09 16:51:32 -06:00
Brad Koehn 181d81d8b6 setting up key for remote build 2023-11-09 16:46:20 -06:00
Brad Koehn fe1d076b54 setting up key for remote build 2023-11-09 16:39:19 -06:00
Brad Koehn d644e427bf setting up key for remote build 2023-11-09 16:30:15 -06:00
Brad Koehn 2843231ba3 setting up key for remote build 2023-11-09 16:27:28 -06:00
Brad Koehn d38cf5c191 setting up key for remote build 2023-11-09 16:23:31 -06:00
Brad Koehn aab6a0cbc3 setting up key for remote build 2023-11-09 16:11:44 -06:00
Brad Koehn 3f5f137aac setting up key for remote build 2023-11-09 15:57:01 -06:00
Brad Koehn f1b9fe6c8f setting up key for remote build 2023-11-09 15:53:26 -06:00
Brad Koehn 63777d0241 setting up key for remote build 2023-11-09 15:32:22 -06:00
Brad Koehn ffe01b37ae setting up key for remote build 2023-11-09 15:27:07 -06:00
Brad Koehn 6ccf13f61e setting up key for remote build 2023-11-09 15:17:02 -06:00
Brad Koehn 06627b7c94 setting up key for remote build 2023-11-09 15:10:24 -06:00
Brad Koehn 47a9a80143 setting up key for remote build 2023-11-09 15:08:02 -06:00
Brad Koehn 59d62b6071 use k3s for amd64 builds 2023-11-09 14:58:37 -06:00
Brad Koehn 63e54dbefb removed woodpecker in favor of Gitea Actions 2023-11-04 11:15:50 -05:00
Brad Koehn 353e9afdca removed woodpecker in favor of Gitea Actions 2023-11-04 11:15:16 -05:00
Brad Koehn 25c88d9aee tweaks 2023-11-04 10:43:03 -05:00
Brad Koehn 9210fd7661 tweaks 2023-11-04 10:40:44 -05:00
Brad Koehn 61ff6dd3ea tweaks 2023-11-04 10:38:50 -05:00
Brad Koehn 2509a90e5e multi-arch 2023-11-04 10:33:08 -05:00
Brad Koehn e21c44f8cc fix build-args 2023-11-04 15:30:17 +00:00
Brad Koehn 97d2c06256 trying gitea actions 2023-11-04 10:27:01 -05:00
Brad Koehn 9330274a80 build locally, for amd/64 2023-07-07 11:32:34 -05:00
Brad Koehn 9e3a846dc1 moved cron back to pipeline 2023-02-28 06:44:10 -06:00
Brad Koehn ff60201d72 move cron and run notify in parallel to build 2023-02-28 06:41:45 -06:00
Brad Koehn 17c6ecb0d7 don't report build failure 2023-02-28 06:35:27 -06:00
Brad Koehn f888c65103 enable cron and only send message as needed 2023-02-27 17:04:32 -06:00
Brad Koehn 2dbb67d57d added matrix stuff to test 2023-02-27 17:02:26 -06:00
Brad Koehn 4821a6be85 versioning the builder 2023-02-27 16:35:31 -06:00
Brad Koehn b4004f97e1 buld tweaks and correct failure detection 2023-02-27 16:26:17 -06:00
Brad Koehn d21915e04f test to rebuild automatically 2023-02-27 16:23:42 -06:00
Brad Koehn b1025bf7be added overnight cron job and latest defaults 2023-02-27 09:37:15 -06:00
Brad Koehn f49433d3ee fixed broken link. 2023-02-26 21:00:52 -06:00
Brad Koehn 53618b8e55 added docker tag to match commit tag 2023-02-26 19:19:49 -06:00
Brad Koehn 179daa3d14 tags working 2023-02-26 19:19:49 -06:00
Brad Koehn 7fe34cd27c fixed tag indexes. I hope 2023-02-26 19:19:49 -06:00
Brad Koehn 7b1cc24f2e remove branch specifier 2023-02-26 19:19:49 -06:00
Brad Koehn 66d4b429cf branch name 2023-02-26 19:19:49 -06:00
Brad Koehn 8d201da1a2 using tagged builds 2023-02-26 19:19:49 -06:00
Brad Koehn 226ba8b2d0 Remove GitLab build 2023-02-26 21:05:08 +00:00
Brad Koehn 93013a5b39 removed unneeded job; mtu was the magic 2023-02-26 08:00:58 -06:00
Brad Koehn 20b012a6a0 tell plugin to lower mtu because mtu path discovery broken 2023-02-26 06:52:30 -06:00
Brad Koehn 83fa1e24a6 use image with ifconfig installed 2023-02-26 06:41:22 -06:00
Brad Koehn 36f146a58f getting mtu 2023-02-26 06:33:21 -06:00
Brad Koehn caf5c50aa6 trying the build outside k3s 2023-02-25 14:07:25 -06:00
Brad Koehn c0dabcc230 just run the test 2023-02-25 13:15:57 -06:00
Brad Koehn 192afe1453 added test job 2023-02-25 13:15:01 -06:00
Brad Koehn 69f99303d4 we need some stinking badges 2023-02-25 11:45:40 -06:00
Brad Koehn ef80955920 make apt-get update less quiet 2023-02-25 11:32:19 -06:00
Brad Koehn 2ae1d24f9a forgot that you cannot build for ARM 2023-02-25 11:22:34 -06:00
Brad Koehn 2b8df13fda fixed build_args 2023-02-25 11:19:32 -06:00
Brad Koehn c1346e5f41 adding environment variable as literals 2023-02-25 11:15:37 -06:00
Brad Koehn 2f98080099 using docker-buildx plugin 2023-02-25 11:11:58 -06:00
Brad Koehn acadcd0db6 attempting to make it work 2023-02-25 10:59:38 -06:00
Brad Koehn 0670df99dc first try 2023-02-25 10:45:43 -06:00
Brad Koehn 9af7b9169d minor build tweaks 2023-02-25 08:44:17 -06:00
Brad Koehn f2fa1d42d6 changed go version so we can keep up easier 2023-02-25 08:42:53 -06:00
Brad Koehn 4666db46fc documentation tweaks 2023-02-25 08:42:14 -06:00
Brad Koehn 6565723c06 update platforms 2022-05-24 20:24:01 -05:00
Brad Koehn a4ca8d4b45 got wal-g 2.0.0 working 2022-05-24 19:52:30 -05:00
Brad Koehn 25642d5ed8 support build on 1.1, nicer build script 2022-05-20 06:38:48 -05:00
Brad Koehn ac557f48c2 merged 2022-05-16 08:29:37 -05:00
Brad Koehn 9fdba2423e simplified build 2022-05-16 08:28:53 -05:00
Brad Koehn 3adadf55b3 Update README.md to point to Postgres documentation. 2022-02-25 14:12:41 +00:00
5 changed files with 62 additions and 46 deletions

No files matched your search

+45
View File
@@ -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 }}
-29
View File
@@ -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
View File
@@ -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/ && \
git clone -b $WALG_RELEASE --recurse-submodules https://github.com/wal-g/wal-g.git && \
cd wal-g && \
@@ -15,7 +15,7 @@ FROM postgres:$BASE
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -qq && \
apt-get update && \
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
+4 -4
View File
@@ -2,7 +2,7 @@
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
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.
## 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
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)
[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_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
These will happen automatically once you've started Postgres with your edited
`postgresql.conf` file (see
[Configuration](https://gitlab.koehn.com/docker/postgres-wal-g#configuration), above).
[Configuration](#configuration), above).
## Recovery
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!
## 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.
+8 -8
View File
@@ -2,18 +2,18 @@
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
build_image() {
BASE=$1
IMAGE=$IMAGE_NAME:$BASE-$REV
docker build --pull -t "$IMAGE" --build-arg BASE=$BASE .
docker push $IMAGE
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
}
build_image "11.1" "$REV"
build_image "9.6"
build_image "$PG_VERSION" "$WALG_VERSION"
wait