Compare commits

...
57 Commits
Author SHA1 Message Date
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
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 a8028d9962 Update README.md 2021-08-20 15:52:46 +00:00
7 changed files with 73 additions and 50 deletions

No files matched your search

-27
View File
@@ -1,27 +0,0 @@
stages:
- build
build:
stage: build
image:
name: moby/buildkit:latest
entrypoint: [""]
script:
- |
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 build --frontend=dockerfile.v0 --local context=$CI_PROJECT_DIR --local dockerfile=$CI_PROJECT_DIR/Dockerfile --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}')
only:
- tags
+15
View File
@@ -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}
+38
View File
@@ -0,0 +1,38 @@
when:
event: cron
cron: "check-base-image"
pipeline:
check-if-base-image-changed:
image: git.koehn.com/docker/postgres-wal-g-build-checker:v0.0.1
settings:
base: postgres:15.2
image: koehn/postgres-wal-g
platforms: linux/amd64
failure: ignore
build:
image: woodpeckerci/plugin-docker-buildx
group: rebuild
secrets: [docker_username, docker_password]
settings:
repo: koehn/postgres-wal-g
platforms: linux/amd64
when:
status: [ failure ]
notify:
image: plugins/matrix
secrets: [matrix_password, matrix_accesstoken]
group: rebuild
settings:
homeserver: https://koehn.com
roomid: "!SxdrFDKduRfxciYhEc:koehn.com"
username: woodpecker
password:
from_secret: matrix_password
accesstoken:
from_secret: matrix_accesstoken
template: "The postgres-wal-g image is out of date and needs to be rebuilt."
when:
status: [ failure ]
+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/ && \ 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
-5
View File
@@ -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
+7 -5
View File
@@ -1,8 +1,10 @@
[![status-badge](https://woodpecker.koehn.com/api/badges/docker/postgres-wal-g/status.svg)](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
@@ -28,7 +31,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
@@ -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.
+8 -8
View File
@@ -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