Compare commits

...

2 commits

Author SHA1 Message Date
f 2e1d831b82 fix: don't produce login errors
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-08-16 12:54:44 -03:00
f e79a054aa4 feat: install specific versions
so we can apply security upgrades
2023-08-16 12:54:24 -03:00
3 changed files with 9 additions and 2 deletions

View file

@ -22,18 +22,24 @@ matrix:
- ALPINE_VERSION: "3.18.3"
PG_VERSION: "15"
PG_VERSION_APPENDED: "15"
PG_VERSION_FULL: "15.4"
- ALPINE_VERSION: "3.17.5"
PG_VERSION: "10"
PG_VERSION_APPENDED: "10"
PG_VERSION_FULL: "10.23"
- ALPINE_VERSION: "3.17.5"
PG_VERSION: "12"
PG_VERSION_APPENDED: "12"
PG_VERSION_FULL: "12.16"
- ALPINE_VERSION: "3.17.5"
PG_VERSION: "13"
PG_VERSION_APPENDED: "13"
PG_VERSION_FULL: "13.12"
- ALPINE_VERSION: "3.17.5"
PG_VERSION: "14"
PG_VERSION_APPENDED: "14"
PG_VERSION_FULL: "14.9"
- ALPINE_VERSION: "3.17.5"
PG_VERSION: "15"
PG_VERSION_APPENDED: "15"
PG_VERSION_FULL: "15.4"

View file

@ -4,6 +4,7 @@ FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>"
ARG PG_VERSION=13
ARG PG_VERSION_APPENDED
ARG PG_VERSION_FULL
ENV PGVER=$PG_VERSION
ENV PGBASE=/var/lib/postgresql
@ -12,7 +13,7 @@ ENV PAGER="less -niSFX"
# Starting from Alpine 3.15 there are several PostgreSQL versions
# supported.
RUN apk add --no-cache postgresql${PG_VERSION_APPENDED} postgresql${PG_VERSION_APPENDED}-contrib daemonize less
RUN apk add --no-cache postgresql${PG_VERSION_APPENDED}~${PG_VERSION_FULL} postgresql${PG_VERSION_APPENDED}-contrib daemonize less
RUN install -dm 750 -o postgres -g postgres /etc/postgres.d
COPY ./monit.conf /etc/monit.d/postgresql.conf

View file

@ -1,4 +1,4 @@
check process postgresql with pidfile /run/postgresql/pid
start program = "/usr/local/bin/postgresqld start"
stop program = "/usr/local/bin/postgresqld stop"
if failed port 5432 protocol pgsql for 3 times within 5 cycles then restart
if failed port 5432 protocol pgsql username postgres for 3 times within 5 cycles then restart