mirror of
https://git.koehn.com/docker/postgres-wal-g.git
synced 2026-11-28 01:43:20 -06:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5067b4257 | ||
|
|
e34430fd7e | ||
|
|
67f8f0cb65 | ||
|
|
a7020c5d4e | ||
|
|
99ef19d076 | ||
|
|
a4118b3a0f | ||
|
|
21f3485321 | ||
|
|
0b977ac06b | ||
|
|
0043e3f3a4 | ||
|
|
b5dbec4366 | ||
|
|
8af3605145 | ||
|
|
fdb7f1c6bf | ||
|
|
6e75b71775 | ||
|
|
80706a20c7 | ||
|
|
1ca880cf44 | ||
|
|
b66f2886bb | ||
|
|
55b02b6caa |
No files matched your search
+3
-3
@@ -4,11 +4,11 @@ stages:
|
|||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
image:
|
image:
|
||||||
name: gcr.io/kaniko-project/executor:debug-v1.2.0
|
name: moby/buildkit:latest
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
cat > /kaniko/.docker/config.json <<EOF
|
cat > /root/.docker/config.json <<EOF
|
||||||
{
|
{
|
||||||
"auths": {
|
"auths": {
|
||||||
"https://index.docker.io/v1/": {
|
"https://index.docker.io/v1/": {
|
||||||
@@ -21,7 +21,7 @@ build:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination koehn/postgres-wal-g:13.1-$CI_COMMIT_TAG --build-arg BASE=13.1 --build-arg WALG_RELEASE=$(echo $CI_COMMIT_TAG | awk -F '-' '{print $1}')
|
- 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:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
+14
-3
@@ -1,12 +1,23 @@
|
|||||||
ARG BASE
|
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
|
FROM postgres:$BASE
|
||||||
|
|
||||||
ARG WALG_RELEASE=v0.2.14
|
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||||
apt-get update -qq && \
|
apt-get update -qq && \
|
||||||
apt-get install -qqy curl ca-certificates libsodium23 vim && \
|
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 -
|
|
||||||
|
COPY --from=build /go/src/wal-g/main/pg/wal-g /usr/local/bin/wal-g
|
||||||
|
|
||||||
COPY wal-g /wal-g
|
COPY wal-g /wal-g
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
@@ -16,8 +16,8 @@ to your bucket
|
|||||||
* `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
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
In your `/varlib/postgresql/data/pgsql/postgresql.conf` file, set your [archive
|
In your `/var/lib/postgresql/data/pgsql/postgresql.conf` file, set your [archive
|
||||||
settings](https://www.postgresql.org/docs/9.1/continuous-archiving.html).
|
settings](https://www.postgresql.org/docs/current/continuous-archiving.html).
|
||||||
Importantly, you should set `archive_mode = on` and
|
Importantly, you should set `archive_mode = on` and
|
||||||
`archive_command = 'wal-g wal-push %p'`. This will
|
`archive_command = 'wal-g wal-push %p'`. This will
|
||||||
tell Postgres to have WAL-G send WAL files to S3.
|
tell Postgres to have WAL-G send WAL files to S3.
|
||||||
|
|||||||
Reference in new issue
Block a user